-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce support for distributed tracing and Open Telemetry
- Loading branch information
1 parent
b4667b6
commit 1cd841a
Showing
31 changed files
with
1,179 additions
and
415 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
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
20 changes: 20 additions & 0 deletions
20
...ntStore.Client.Extensions.OpenTelemetry/EventStore.Client.Extensions.OpenTelemetry.csproj
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,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<RootNamespace>EventStore.Client.Extensions.OpenTelemetry</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<PackageId>EventStore.Client.Extensions.OpenTelemetry</PackageId> | ||
<Description>Extensions used to facilitate instrumentation of the EventStore Client.</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="OpenTelemetry.Api" Version="1.8.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="../EventStore.Client/Diagnostics/EventStoreClientInstrumentation.cs" Link="%(FileName)%(Extension)"/> | ||
</ItemGroup> | ||
|
||
</Project> |
19 changes: 19 additions & 0 deletions
19
src/EventStore.Client.Extensions.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,19 @@ | ||
using EventStore.Client.Diagnostics; | ||
using JetBrains.Annotations; | ||
using OpenTelemetry.Trace; | ||
|
||
namespace EventStore.Client.Extensions.OpenTelemetry; | ||
|
||
/// <summary> | ||
/// Extension methods used to facilitate instrumentation of the EventStore Client. | ||
/// </summary> | ||
[PublicAPI] | ||
public static class TracerProviderBuilderExtensions { | ||
/// <summary> | ||
/// Enables instrumentation of the EventStore .NET Client on the OpenTelemetry TracerProvider. | ||
/// </summary> | ||
/// <param name="builder"><see cref="TracerProviderBuilder"/> being configured.</param> | ||
/// <returns>The instance of <see cref="TracerProviderBuilder"/> to chain configuration.</returns> | ||
public static TracerProviderBuilder AddEventStoreClientInstrumentation(this TracerProviderBuilder builder) | ||
=> builder.AddSource(EventStoreClientInstrumentation.ActivitySourceName); | ||
} |
Oops, something went wrong.