Skip to content

Commit

Permalink
Cleanup references to semantic convetion 'component' attribute (#1555)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariojonke authored Jan 29, 2021
1 parent cf8b70e commit 05ab4a7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions docs/examples/auto-instrumentation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion docs/examples/django/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 2 additions & 4 deletions opentelemetry-sdk/tests/trace/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand All @@ -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"],
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 05ab4a7

Please sign in to comment.