Skip to content

Commit

Permalink
add args to context manager
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole committed Jan 1, 2024
1 parent 58d318b commit 0a26561
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions application/web/web_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ def neo4j_not_running_rejection():
)

class CRETracer:
def __enter__(self,trace_name):
def __init__(self,trace_name:str) -> None:
self.trace_name = trace_name

def __enter__(self):
global tracer
if tracer:
self.span = tracer.start_span(trace_name)
self.span = tracer.start_span(self.trace_name)

def __exit__(self, *args):
global tracer
Expand Down

0 comments on commit 0a26561

Please sign in to comment.