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:
parent
842daff4d9
commit
9e9987a3a3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -183,8 +183,6 @@ namespace OpenTelemetry.Exporter.Zipkin.Tests
|
|||
[ResourceSemanticConventions.AttributeServiceName] = serviceName,
|
||||
["service.tag"] = "hello world",
|
||||
}).Build());
|
||||
|
||||
resoureTags = "\"service.tag\":\"hello world\",";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue