This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/main by this push:
new 7451219 PROTON-2488: [Python] Fix failure with tracing and message
annotations
7451219 is described below
commit 745121991192a6b5789142ebacf8026231fc5854
Author: Andrew Stitcher <[email protected]>
AuthorDate: Fri Jan 21 13:34:54 2022 -0500
PROTON-2488: [Python] Fix failure with tracing and message annotations
This fixes a bad assumption in the tracing code that if tracing is on
and a message has any annotations then it must have tracing annotations.
---
python/proton/_tracing.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/proton/_tracing.py b/python/proton/_tracing.py
index c398a58..d8ca80e 100644
--- a/python/proton/_tracing.py
+++ b/python/proton/_tracing.py
@@ -89,7 +89,7 @@ class IncomingMessageHandler(ProtonIncomingMessageHandler):
tags.PEER_HOSTNAME: connection.hostname,
'inserted_by': 'proton-message-tracing'
}
- if message.annotations is not None:
+ if message.annotations is not None and _trace_key in
message.annotations:
headers = message.annotations[_trace_key]
span_ctx = tracer.extract(Format.TEXT_MAP, headers)
with tracer.start_active_span('amqp-delivery-receive',
child_of=span_ctx, tags=span_tags):
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]