Skip to content

Commit b575c7d

Browse files
authored
fix(sdk): support disabling all instrumentations (#3353)
1 parent 23844bb commit b575c7d

File tree

1 file changed

+3
-2
lines changed
  • packages/traceloop-sdk/traceloop/sdk/tracing

1 file changed

+3
-2
lines changed

packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,10 @@ def init_instrumentations(
428428
block_instruments: Optional[Set[Instruments]] = None,
429429
):
430430
block_instruments = block_instruments or set()
431-
instruments = instruments or set(
431+
# explictly test for None since empty set is a False value
432+
instruments = instruments if instruments is not None else set(
432433
Instruments
433-
) # Use all instruments if none specified
434+
)
434435

435436
# Remove any instruments that were explicitly blocked
436437
instruments = instruments - block_instruments

0 commit comments

Comments
 (0)