From 3f30bb5997ade609a8c3c8176ac2e6cadf2ddf00 Mon Sep 17 00:00:00 2001 From: naisanzaa Date: Sat, 13 Apr 2024 02:27:11 -0400 Subject: [PATCH] datadog: fix add_event --- automon/integrations/openTelemetryWrapper/client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automon/integrations/openTelemetryWrapper/client.py b/automon/integrations/openTelemetryWrapper/client.py index b57a719e..391772a3 100644 --- a/automon/integrations/openTelemetryWrapper/client.py +++ b/automon/integrations/openTelemetryWrapper/client.py @@ -73,13 +73,13 @@ async def start_producer(self): async def test(self): with self.config.tracer.start_as_current_span(name='rootSpan') as trace_root: - self.add_event('AAAAAAAA') + self.config.opentelemetry.trace.get_current_span().add_event('AAAAAAAA') with self.config.tracer.start_as_current_span(name='childSpan') as trace_child: - self.add_event('AAAAAAAA') - self.add_event('BBBBBBBB') + self.config.opentelemetry.trace.get_current_span().add_event('AAAAAAAA') + self.config.opentelemetry.trace.get_current_span().add_event('BBBBBBBB') - self.add_event('BBBBBBBB') + self.config.opentelemetry.trace.get_current_span().add_event('BBBBBBBB') return True