Zipkin Span tags will no longer be populated with Resource Attributes (#1663)

* Remove Resource tag population

* Changelog updated

* Removing test case involving Resource

* removing local dictionary of tags, unused

* Making @CodeBlanch 's test changes thank you!

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
This commit is contained in:
Austin Tan 2021-01-26 18:14:16 -08:00 committed by GitHub
parent 842daff4d9
commit 9e9987a3a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 17 deletions

View File

@ -20,6 +20,9 @@
`True`/`False`.
([#1609](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1609))
* Span tags will no longer be populated with Resource Attributes.
([#1663](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1663))
## 1.0.0-rc1.1
Released 2020-Nov-17

View File

@ -108,24 +108,13 @@ namespace OpenTelemetry.Exporter.Zipkin
}
string serviceName = null;
Dictionary<string, object> tags = null;
foreach (var label in resource.Attributes)
{
string key = label.Key;
switch (key)
if (label.Key == ResourceSemanticConventions.AttributeServiceName)
{
case ResourceSemanticConventions.AttributeServiceName:
serviceName = label.Value as string;
continue;
serviceName = label.Value as string;
break;
}
if (tags == null)
{
tags = new Dictionary<string, object>();
}
tags[key] = label.Value;
}
if (string.IsNullOrEmpty(serviceName))
@ -138,7 +127,7 @@ namespace OpenTelemetry.Exporter.Zipkin
ipv4,
ipv6,
port: null,
tags);
tags: null);
}
private static string ResolveHostAddress(string hostName, AddressFamily family)

View File

@ -183,8 +183,6 @@ namespace OpenTelemetry.Exporter.Zipkin.Tests
[ResourceSemanticConventions.AttributeServiceName] = serviceName,
["service.tag"] = "hello world",
}).Build());
resoureTags = "\"service.tag\":\"hello world\",";
}
else
{