Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05ab4a7

Browse files
authored
Cleanup references to semantic convetion 'component' attribute (open-telemetry#1555)
1 parent cf8b70e commit 05ab4a7

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

docs/examples/auto-instrumentation/README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ similar to the following example:
124124
"status_code": "OK"
125125
},
126126
"attributes": {
127-
"component": "http",
128127
"http.method": "GET",
129128
"http.server_name": "127.0.0.1",
130129
"http.scheme": "http",
@@ -181,7 +180,6 @@ similar to the following example:
181180
"status_code": "OK"
182181
},
183182
"attributes": {
184-
"component": "http",
185183
"http.method": "GET",
186184
"http.server_name": "127.0.0.1",
187185
"http.scheme": "http",

docs/examples/django/README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ output similar to this one:
8080
"status_code": "OK"
8181
},
8282
"attributes": {
83-
"component": "http",
8483
"http.method": "GET",
8584
"http.server_name": "localhost",
8685
"http.scheme": "http",

opentelemetry-sdk/tests/trace/test_trace.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ def test_attributes(self):
549549
with self.tracer.start_as_current_span("root") as root:
550550
root.set_attributes(
551551
{
552-
"component": "http",
553552
"http.method": "GET",
554553
"http.url": "https://example.com:779/path/12/?q=d#123",
555554
}
@@ -570,8 +569,7 @@ def test_attributes(self):
570569
list_of_numerics = [123, 314, 0]
571570
root.set_attribute("list-of-numerics", list_of_numerics)
572571

573-
self.assertEqual(len(root.attributes), 10)
574-
self.assertEqual(root.attributes["component"], "http")
572+
self.assertEqual(len(root.attributes), 9)
575573
self.assertEqual(root.attributes["http.method"], "GET")
576574
self.assertEqual(
577575
root.attributes["http.url"],
@@ -900,7 +898,7 @@ def test_ended_span(self):
900898
self.assertEqual(end_time0, root.end_time)
901899

902900
with self.assertLogs(level=WARNING):
903-
root.set_attribute("component", "http")
901+
root.set_attribute("http.method", "GET")
904902
self.assertEqual(len(root.attributes), 0)
905903

906904
with self.assertLogs(level=WARNING):

0 commit comments

Comments
 (0)