From d1c174df1731ccb758e962a73604598610679bac Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Thu, 12 Nov 2020 15:27:34 -0300 Subject: [PATCH] Adding service.namespace as tags for zipkin (#1521) updating changelog updating changelog updating changelog Revert "Adding service.namespace as tags for zipkin" This reverts commit 1868e71b964fa030bc33ece441047b19fa221688. updating file and changelog --- src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md | 2 ++ src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs | 12 +----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md b/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md index 122a0ec1ea..26cdb14964 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md @@ -4,6 +4,8 @@ * Zipkin tags used for InstrumentationLibrary changed from library.name, library.version to otel.library.name, otel.library.version respectively. +* Sending `service.namespace` as Zipkin tag. + ([#1521](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1521)) ## 0.8.0-beta.1 diff --git a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs index d9a8d45375..69c10d5899 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs +++ b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs @@ -108,7 +108,6 @@ internal void SetLocalEndpointFromResource(Resource resource) } string serviceName = null; - string serviceNamespace = null; Dictionary tags = null; foreach (var label in resource.Attributes) { @@ -119,9 +118,6 @@ internal void SetLocalEndpointFromResource(Resource resource) case Resource.ServiceNameKey: serviceName = label.Value as string; continue; - case Resource.ServiceNamespaceKey: - serviceNamespace = label.Value as string; - continue; } if (tags == null) @@ -132,13 +128,7 @@ internal void SetLocalEndpointFromResource(Resource resource) tags[key] = label.Value; } - if (!string.IsNullOrEmpty(serviceName)) - { - serviceName = serviceNamespace != null - ? serviceNamespace + "." + serviceName - : serviceName; - } - else + if (string.IsNullOrEmpty(serviceName)) { serviceName = this.options.ServiceName; }