Skip to content

Commit

Permalink
Adding service.namespace as tags for zipkin
Browse files Browse the repository at this point in the history
updating changelog

updating changelog

updating changelog

Revert "Adding service.namespace as tags for zipkin"

This reverts commit 1868e71b964fa030bc33ece441047b19fa221688.

updating file and changelog
  • Loading branch information
eddynaka committed Nov 12, 2020
1 parent cb7f421 commit 407047a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 1 addition & 11 deletions src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ internal void SetLocalEndpointFromResource(Resource resource)
}

string serviceName = null;
string serviceNamespace = null;
Dictionary<string, object> tags = null;
foreach (var label in resource.Attributes)
{
Expand All @@ -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)
Expand All @@ -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;
}
Expand Down

0 comments on commit 407047a

Please sign in to comment.