From 05ab4a70e17958d3d75c6c35253216d5afb42085 Mon Sep 17 00:00:00 2001 From: Mario Jonke Date: Sat, 30 Jan 2021 00:21:08 +0100 Subject: [PATCH] Cleanup references to semantic convetion 'component' attribute (#1555) --- docs/examples/auto-instrumentation/README.rst | 2 -- docs/examples/django/README.rst | 1 - opentelemetry-sdk/tests/trace/test_trace.py | 6 ++---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/examples/auto-instrumentation/README.rst b/docs/examples/auto-instrumentation/README.rst index f85106b66d8..0c8a0e929da 100644 --- a/docs/examples/auto-instrumentation/README.rst +++ b/docs/examples/auto-instrumentation/README.rst @@ -124,7 +124,6 @@ similar to the following example: "status_code": "OK" }, "attributes": { - "component": "http", "http.method": "GET", "http.server_name": "127.0.0.1", "http.scheme": "http", @@ -181,7 +180,6 @@ similar to the following example: "status_code": "OK" }, "attributes": { - "component": "http", "http.method": "GET", "http.server_name": "127.0.0.1", "http.scheme": "http", diff --git a/docs/examples/django/README.rst b/docs/examples/django/README.rst index 0e5606c6dab..43983721026 100644 --- a/docs/examples/django/README.rst +++ b/docs/examples/django/README.rst @@ -80,7 +80,6 @@ output similar to this one: "status_code": "OK" }, "attributes": { - "component": "http", "http.method": "GET", "http.server_name": "localhost", "http.scheme": "http", diff --git a/opentelemetry-sdk/tests/trace/test_trace.py b/opentelemetry-sdk/tests/trace/test_trace.py index d17bd2ef215..b507bc54399 100644 --- a/opentelemetry-sdk/tests/trace/test_trace.py +++ b/opentelemetry-sdk/tests/trace/test_trace.py @@ -549,7 +549,6 @@ def test_attributes(self): with self.tracer.start_as_current_span("root") as root: root.set_attributes( { - "component": "http", "http.method": "GET", "http.url": "https://example.com:779/path/12/?q=d#123", } @@ -570,8 +569,7 @@ def test_attributes(self): list_of_numerics = [123, 314, 0] root.set_attribute("list-of-numerics", list_of_numerics) - self.assertEqual(len(root.attributes), 10) - self.assertEqual(root.attributes["component"], "http") + self.assertEqual(len(root.attributes), 9) self.assertEqual(root.attributes["http.method"], "GET") self.assertEqual( root.attributes["http.url"], @@ -900,7 +898,7 @@ def test_ended_span(self): self.assertEqual(end_time0, root.end_time) with self.assertLogs(level=WARNING): - root.set_attribute("component", "http") + root.set_attribute("http.method", "GET") self.assertEqual(len(root.attributes), 0) with self.assertLogs(level=WARNING):