Skip to content

Commit

Permalink
fix: Overload __exit__ method for NoOpTracer
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianNiehusAA committed Aug 12, 2024
1 parent 73db2da commit d63746a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/intelligence_layer/core/tracer/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,14 @@ def end(self, timestamp: Optional[datetime] = None) -> None:
def export_for_viewing(self) -> Sequence[ExportedSpan]:
return []

def __exit__(
self,
exc_type: Optional[type[BaseException]],
exc_value: Optional[BaseException],
_traceback: Optional[TracebackType],
) -> None:
pass


class JsonSerializer(RootModel[PydanticSerializable]):
root: SerializeAsAny[PydanticSerializable]

0 comments on commit d63746a

Please sign in to comment.