Changed the name of the ActivitySource and Metric to clarify that the semantic conventions have not been ratified yet. (#194)

* Changed the name of the ActivitySource and Metric to clarify that the semantic conventions have not been ratified yet.

* Update src/ModelContextProtocol/Diagnostics.cs

---------

Co-authored-by: Sam Spencer <samsp@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
Sam Spencer 2025-04-02 14:02:46 -07:00 • committed by GitHub
commit 9302466041
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ namespace ModelContextProtocol;
internal static class Diagnostics internal static class Diagnostics
{ {
internal static ActivitySource ActivitySource { get; } = new("ModelContextProtocol"); internal static ActivitySource ActivitySource { get; } = new("Experimental.ModelContextProtocol");
/// <summary> /// <summary>
/// Follows boundaries from http.server.request.duration/http.client.request.duration /// Follows boundaries from http.server.request.duration/http.client.request.duration
@ -24,6 +24,6 @@ internal static class Diagnostics
HistogramBucketBoundaries = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300], HistogramBucketBoundaries = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300],
}; };
internal static Meter Meter { get; } = new("ModelContextProtocol"); internal static Meter Meter { get; } = new("Experimental.ModelContextProtocol");
} }

View file

@ -17,7 +17,7 @@ public class DiagnosticTests
var activities = new List<Activity>(); var activities = new List<Activity>();
using (var tracerProvider = OpenTelemetry.Sdk.CreateTracerProviderBuilder() using (var tracerProvider = OpenTelemetry.Sdk.CreateTracerProviderBuilder()
.AddSource("ModelContextProtocol") .AddSource("Experimental.ModelContextProtocol")
.AddInMemoryExporter(activities) .AddInMemoryExporter(activities)
.Build()) .Build())
{ {