Skip to content

Commit

Permalink
Restore backward compatibility (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov authored Dec 19, 2024
1 parent e536f35 commit fd0117c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neuro_logging/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def new_sentry_trace_cm(


@asynccontextmanager
async def new_trace_cm(name: str, sampled: bool) -> AsyncIterator[None]:
async def new_trace_cm(name: str, sampled: bool = False) -> AsyncIterator[None]:
async with new_sentry_trace_cm(name, sampled):
yield

Expand Down Expand Up @@ -97,7 +97,7 @@ async def tracer(*args: Any, **kwargs: Any) -> Any:
def new_trace(func: T) -> T:
async def _tracer(*args: Any, **kwargs: Any) -> Any:
name = func.__qualname__
async with new_trace_cm(name, sampled=False):
async with new_trace_cm(name):
return await func(*args, **kwargs)

@functools.wraps(func)
Expand Down

0 comments on commit fd0117c

Please sign in to comment.