Which component is this bug for?
Traceloop SDK
📜 Description
Traceloop.init(enabled=False) works as a no-op setting. Any subsequent call on instrumented methods are silently skipped.
TRACELOOP_TRACING_ENABLED=false does not work in the same way. E.g calling methods that are decorated with @workflow() yields error logs.
👟 Reproduction steps
- set TRACELOOP_TRACING_ENABLED=false
- run
Traceloop.init()
- run:
from traceloop.sdk.decorators import workflow
@workflow(name="hello-world")
def hello_world():
return "hello world!"
hello_world()
👍 Expected behavior
-
printed "Traceloop instrumentation is disabled via init flag"
-
nothing
👎 Actual Behavior with Screenshots
-
printed "Tracing is disabled"
-
printed "Warning: Traceloop not initialized, make sure you call Traceloop.init()"
🤖 Python Version
3.12
📃 Provide any additional context for the Bug.
Probably related to the two different ways of handling disabled in these lines.
👀 Have you spent some time to check if this bug has been raised before?
Are you willing to submit PR?
Yes I am willing to submit a PR!
Which component is this bug for?
Traceloop SDK
📜 Description
Traceloop.init(enabled=False)works as a no-op setting. Any subsequent call on instrumented methods are silently skipped.TRACELOOP_TRACING_ENABLED=false does not work in the same way. E.g calling methods that are decorated with
@workflow()yields error logs.👟 Reproduction steps
Traceloop.init()👍 Expected behavior
printed "Traceloop instrumentation is disabled via init flag"
nothing
👎 Actual Behavior with Screenshots
printed "Tracing is disabled"
printed "Warning: Traceloop not initialized, make sure you call Traceloop.init()"
🤖 Python Version
3.12
📃 Provide any additional context for the Bug.
Probably related to the two different ways of handling disabled in these lines.
👀 Have you spent some time to check if this bug has been raised before?
Are you willing to submit PR?
Yes I am willing to submit a PR!