Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Sep 27, 2023
1 parent 34a5545 commit 6e61be6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion opentelemetry-sdk/tests/trace/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def test_attributes(self):
root.set_attribute("list-of-numerics", list_of_numerics)

self.assertEqual(len(root.attributes), 9)
self.assertEqual(root.attributes["http.method"], "GET")
self.assertEqual(root.attributes["http.request.method"], "GET")
self.assertEqual(
root.attributes["url.full"],
"https://example.com:779/path/12/?q=d#123",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,11 @@ class SpanAttributes:
Deprecated. Use `client.address` attribute.
"""

HTTP_FLAVOR = "http.flavor"
"""
Deprecated. Use `network.protocol.name` and `network.protocol.version` attributes.
"""

NET_HOST_CONNECTION_TYPE = "net.host.connection.type"
"""
Deprecated. Use `network.connection.type` attribute.
Expand Down
2 changes: 1 addition & 1 deletion scripts/semconv/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OTEL_SEMCONV_GEN_IMG_VERSION=0.21.0

cd ${SCRIPT_DIR}

rm -rf semantic-c || true
rm -rf semantic-conventions || true
mkdir semantic-conventions
cd semantic-conventions

Expand Down
9 changes: 7 additions & 2 deletions scripts/semconv/templates/semantic_attributes.j2
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ class {{class}}:
"http.request_content_length_uncompressed"
)
"""
Deprecated, use the `http.request_content_length` attribute.
Deprecated, use the `http.request.body.size` attribute.
"""

HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = (
"http.response_content_length_uncompressed"
)
"""
Deprecated, use the `http.response_content_length` attribute.
Deprecated, use the `http.response.body.size` attribute.
"""

MESSAGING_DESTINATION = "messaging.destination"
Expand Down Expand Up @@ -164,6 +164,11 @@ class {{class}}:
Deprecated. Use `client.address` attribute.
"""

HTTP_FLAVOR = "http.flavor"
"""
Deprecated. Use `network.protocol.name` and `network.protocol.version` attributes.
"""

NET_HOST_CONNECTION_TYPE = "net.host.connection.type"
"""
Deprecated. Use `network.connection.type` attribute.
Expand Down

0 comments on commit 6e61be6

Please sign in to comment.