-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Added missing extension to enable mediator tracing
- Loading branch information
1 parent
de07b37
commit 543d456
Showing
4 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/AspNetCore/src/OpenTelemetry/TracerProviderBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) Fusonic GmbH. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE file in the project root for license information. | ||
|
||
using OpenTelemetry.Trace; | ||
|
||
namespace Fusonic.Extensions.AspNetCore.OpenTelemetry; | ||
|
||
public static class TracerProviderBuilderExtensions | ||
{ | ||
/// <summary> | ||
/// Enables tracing for mediator requests and notifications.<br/> | ||
/// Note: You also need to call <see cref="ContainerExtensions.RegisterMediatorTracingDecorators"/> to enable tracing. | ||
/// </summary> | ||
public static TracerProviderBuilder AddMediatorInstrumentation(this TracerProviderBuilder builder) | ||
=> builder.AddSource(MediatorTracer.ActivitySourceName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters