diff --git a/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs b/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs index 52611fd6734..f6c7c780fc1 100644 --- a/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs +++ b/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs @@ -111,9 +111,6 @@ internal void SetResource(Resource resource) case Resource.ServiceNamespaceKey: serviceNamespace = strVal; continue; - case Resource.LibraryNameKey: - case Resource.LibraryVersionKey: - continue; } } diff --git a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs index 5a985c98d48..d9a8d453756 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs +++ b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs @@ -122,9 +122,6 @@ internal void SetLocalEndpointFromResource(Resource resource) case Resource.ServiceNamespaceKey: serviceNamespace = label.Value as string; continue; - case Resource.LibraryNameKey: - case Resource.LibraryVersionKey: - continue; } if (tags == null) diff --git a/src/OpenTelemetry/.publicApi/net452/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/net452/PublicAPI.Unshipped.txt index de3447bd35a..d3f05554ca0 100644 --- a/src/OpenTelemetry/.publicApi/net452/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/net452/PublicAPI.Unshipped.txt @@ -169,8 +169,6 @@ abstract OpenTelemetry.Metrics.Export.MetricExporter.ExportAsync(System.Collecti abstract OpenTelemetry.Metrics.Export.MetricProcessor.FinishCollectionCycle(out System.Collections.Generic.IEnumerable metrics) -> void abstract OpenTelemetry.Metrics.Export.MetricProcessor.Process(OpenTelemetry.Metrics.Export.Metric metric) -> void abstract OpenTelemetry.Trace.Sampler.ShouldSample(in OpenTelemetry.Trace.SamplingParameters samplingParameters) -> OpenTelemetry.Trace.SamplingResult -const OpenTelemetry.Resources.Resource.LibraryNameKey = "name" -> string -const OpenTelemetry.Resources.Resource.LibraryVersionKey = "version" -> string const OpenTelemetry.Resources.Resource.ServiceInstanceIdKey = "service.instance.id" -> string const OpenTelemetry.Resources.Resource.ServiceNameKey = "service.name" -> string const OpenTelemetry.Resources.Resource.ServiceNamespaceKey = "service.namespace" -> string diff --git a/src/OpenTelemetry/.publicApi/net46/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/net46/PublicAPI.Unshipped.txt index de3447bd35a..d3f05554ca0 100644 --- a/src/OpenTelemetry/.publicApi/net46/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/net46/PublicAPI.Unshipped.txt @@ -169,8 +169,6 @@ abstract OpenTelemetry.Metrics.Export.MetricExporter.ExportAsync(System.Collecti abstract OpenTelemetry.Metrics.Export.MetricProcessor.FinishCollectionCycle(out System.Collections.Generic.IEnumerable metrics) -> void abstract OpenTelemetry.Metrics.Export.MetricProcessor.Process(OpenTelemetry.Metrics.Export.Metric metric) -> void abstract OpenTelemetry.Trace.Sampler.ShouldSample(in OpenTelemetry.Trace.SamplingParameters samplingParameters) -> OpenTelemetry.Trace.SamplingResult -const OpenTelemetry.Resources.Resource.LibraryNameKey = "name" -> string -const OpenTelemetry.Resources.Resource.LibraryVersionKey = "version" -> string const OpenTelemetry.Resources.Resource.ServiceInstanceIdKey = "service.instance.id" -> string const OpenTelemetry.Resources.Resource.ServiceNameKey = "service.name" -> string const OpenTelemetry.Resources.Resource.ServiceNamespaceKey = "service.namespace" -> string diff --git a/src/OpenTelemetry/.publicApi/net461/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/net461/PublicAPI.Unshipped.txt index edaf6a43faa..135e6e2416e 100644 --- a/src/OpenTelemetry/.publicApi/net461/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/net461/PublicAPI.Unshipped.txt @@ -188,8 +188,6 @@ abstract OpenTelemetry.Metrics.Export.MetricExporter.ExportAsync(System.Collecti abstract OpenTelemetry.Metrics.Export.MetricProcessor.FinishCollectionCycle(out System.Collections.Generic.IEnumerable metrics) -> void abstract OpenTelemetry.Metrics.Export.MetricProcessor.Process(OpenTelemetry.Metrics.Export.Metric metric) -> void abstract OpenTelemetry.Trace.Sampler.ShouldSample(in OpenTelemetry.Trace.SamplingParameters samplingParameters) -> OpenTelemetry.Trace.SamplingResult -const OpenTelemetry.Resources.Resource.LibraryNameKey = "name" -> string -const OpenTelemetry.Resources.Resource.LibraryVersionKey = "version" -> string const OpenTelemetry.Resources.Resource.ServiceInstanceIdKey = "service.instance.id" -> string const OpenTelemetry.Resources.Resource.ServiceNameKey = "service.name" -> string const OpenTelemetry.Resources.Resource.ServiceNamespaceKey = "service.namespace" -> string diff --git a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt index edaf6a43faa..135e6e2416e 100644 --- a/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt @@ -188,8 +188,6 @@ abstract OpenTelemetry.Metrics.Export.MetricExporter.ExportAsync(System.Collecti abstract OpenTelemetry.Metrics.Export.MetricProcessor.FinishCollectionCycle(out System.Collections.Generic.IEnumerable metrics) -> void abstract OpenTelemetry.Metrics.Export.MetricProcessor.Process(OpenTelemetry.Metrics.Export.Metric metric) -> void abstract OpenTelemetry.Trace.Sampler.ShouldSample(in OpenTelemetry.Trace.SamplingParameters samplingParameters) -> OpenTelemetry.Trace.SamplingResult -const OpenTelemetry.Resources.Resource.LibraryNameKey = "name" -> string -const OpenTelemetry.Resources.Resource.LibraryVersionKey = "version" -> string const OpenTelemetry.Resources.Resource.ServiceInstanceIdKey = "service.instance.id" -> string const OpenTelemetry.Resources.Resource.ServiceNameKey = "service.name" -> string const OpenTelemetry.Resources.Resource.ServiceNamespaceKey = "service.namespace" -> string diff --git a/src/OpenTelemetry/Resources/Resource.cs b/src/OpenTelemetry/Resources/Resource.cs index c583fb185a1..ae2d7bcbdd1 100644 --- a/src/OpenTelemetry/Resources/Resource.cs +++ b/src/OpenTelemetry/Resources/Resource.cs @@ -30,8 +30,6 @@ public class Resource public const string ServiceNamespaceKey = "service.namespace"; public const string ServiceInstanceIdKey = "service.instance.id"; public const string ServiceVersionKey = "service.version"; - public const string LibraryNameKey = "name"; - public const string LibraryVersionKey = "version"; // this implementation follows https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/sdk.md diff --git a/test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterTests.cs b/test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterTests.cs index 7873a8ce68e..7c14f518fd5 100644 --- a/test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterTests.cs +++ b/test/OpenTelemetry.Exporter.Jaeger.Tests/JaegerExporterTests.cs @@ -102,15 +102,15 @@ public void JaegerTraceExporter_SetResource_CombinesTags() } [Fact] - public void JaegerTraceExporter_SetResource_IgnoreLibraryResources() + public void JaegerTraceExporter_SetResource_IgnoreServiceResources() { using var jaegerTraceExporter = new JaegerExporter(new JaegerExporterOptions()); var process = jaegerTraceExporter.Process; jaegerTraceExporter.SetResource(new Resource(new Dictionary { - [Resource.LibraryNameKey] = "libname", - [Resource.LibraryVersionKey] = "libversion", + [Resource.ServiceNameKey] = "servicename", + [Resource.ServiceNamespaceKey] = "servicenamespace", })); Assert.Null(process.Tags);