Revert "sdk: rename resource labels to attributes (#1082)"
This reverts commit 326d77aa7d.
This commit is contained in:
parent
7e98588736
commit
e8a974ce80
|
|
@ -211,7 +211,7 @@ def _extract_tags_from_dict(tags_dict):
|
|||
def _extract_tags_from_span(span: Span):
|
||||
tags = _extract_tags_from_dict(getattr(span, "attributes", None))
|
||||
if span.resource:
|
||||
tags.update(_extract_tags_from_dict(span.resource.attributes))
|
||||
tags.update(_extract_tags_from_dict(span.resource.labels))
|
||||
return tags
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -177,14 +177,14 @@ class TestZipkinSpanExporter(unittest.TestCase):
|
|||
|
||||
otel_spans[1].start(start_time=start_times[1])
|
||||
otel_spans[1].resource = Resource(
|
||||
attributes={"key_resource": "some_resource"}
|
||||
labels={"key_resource": "some_resource"}
|
||||
)
|
||||
otel_spans[1].end(end_time=end_times[1])
|
||||
|
||||
otel_spans[2].start(start_time=start_times[2])
|
||||
otel_spans[2].set_attribute("key_string", "hello_world")
|
||||
otel_spans[2].resource = Resource(
|
||||
attributes={"key_resource": "some_resource"}
|
||||
labels={"key_resource": "some_resource"}
|
||||
)
|
||||
otel_spans[2].end(end_time=end_times[2])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue