Skip to content

Commit

Permalink
set object id as context id
Browse files Browse the repository at this point in the history
  • Loading branch information
sovaa committed Oct 8, 2021
1 parent 649b67d commit 274810c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion logistik/queue/event_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ def create_env(self):
def handle_event(self, topic, data):
self.logger.info(f"request: {data}")

with self.env.tracer.start_span("handle-event", event_id=data["id"]) as span:
context_id = None
if "object" in data and "id" in data["object"]:
context_id = data["object"]["id"]

with self.env.tracer.start_span("handle-event", event_id=data["id"], context_id=context_id) as span:
span.log_kv(data)
self.handler_manager.handle_event(topic, data, span_ctx=span)

Expand Down

0 comments on commit 274810c

Please sign in to comment.