Skip to content

Commit

Permalink
datadog: fix self.config.tracer.start_as_current_span
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Apr 13, 2024
1 parent f5ae397 commit 1dad5ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automon/integrations/openTelemetryWrapper/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ async def start_producer(self):
return

async def test(self):
with self.start_as_current_span(name='rootSpan') as trace_root:
with self.config.tracer.start_as_current_span(name='rootSpan') as trace_root:
self.config.opentelemetry.trace.get_current_span().add_event('AAAAAAAA')

with self.start_as_current_span(name='childSpan') as trace_child:
with self.config.tracer.start_as_current_span(name='childSpan') as trace_child:
self.config.opentelemetry.trace.get_current_span().add_event('AAAAAAAA')
self.config.opentelemetry.trace.get_current_span().add_event('BBBBBBBB')

Expand Down

0 comments on commit 1dad5ad

Please sign in to comment.