Skip to content

Commit 59bc139

Browse files
committed
fix: change schema
1 parent a38dd2c commit 59bc139

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

instrumentation/opentelemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/span_builder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
from opentelemetry.instrumentation.utils import is_instrumentation_enabled
1919
from opentelemetry.semconv._incubating.attributes.messaging_attributes import (
20-
MESSAGING_DESTINATION_TEMPORARY,
2120
MESSAGING_MESSAGE_CONVERSATION_ID,
2221
MESSAGING_MESSAGE_ID,
2322
MESSAGING_OPERATION,
@@ -94,7 +93,9 @@ def build(self) -> Optional[Span]:
9493
if self._operation:
9594
self._attributes[MESSAGING_OPERATION] = self._operation.value
9695
else:
97-
self._attributes[MESSAGING_DESTINATION_TEMPORARY] = True
96+
# TODO: Update this implementation once the semantic conventions for messaging stabilize
97+
# See: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/messaging.md
98+
self._attributes[SpanAttributes.MESSAGING_TEMP_DESTINATION] = True
9899
span = self._tracer.start_span(
99100
self._generate_span_name(),
100101
kind=self._kind,

instrumentation/opentelemetry-instrumentation-aio-pika/tests/test_publish_decorator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
PublishDecorator,
2323
)
2424
from opentelemetry.semconv._incubating.attributes.messaging_attributes import (
25-
MESSAGING_DESTINATION_TEMPORARY,
2625
MESSAGING_MESSAGE_CONVERSATION_ID,
2726
MESSAGING_MESSAGE_ID,
2827
MESSAGING_SYSTEM,
@@ -60,7 +59,7 @@ class TestInstrumentedExchangeAioRmq7(TestCase):
6059
NET_PEER_PORT: SERVER_PORT,
6160
MESSAGING_MESSAGE_ID: MESSAGE_ID,
6261
MESSAGING_MESSAGE_CONVERSATION_ID: CORRELATION_ID,
63-
MESSAGING_DESTINATION_TEMPORARY: True,
62+
SpanAttributes.MESSAGING_TEMP_DESTINATION: True,
6463
}
6564

6665
def setUp(self):
@@ -139,7 +138,7 @@ class TestInstrumentedExchangeAioRmq8(TestCase):
139138
NET_PEER_PORT: SERVER_PORT,
140139
MESSAGING_MESSAGE_ID: MESSAGE_ID,
141140
MESSAGING_MESSAGE_CONVERSATION_ID: CORRELATION_ID,
142-
MESSAGING_DESTINATION_TEMPORARY: True,
141+
SpanAttributes.MESSAGING_TEMP_DESTINATION: True,
143142
}
144143

145144
def setUp(self):

0 commit comments

Comments
 (0)