openllmetry icon indicating copy to clipboard operation
openllmetry copied to clipboard

🐛 Bug Report: Telemetry enabled regardless of parameter

Open roger-collins-self opened this issue 1 year ago • 2 comments

Which component is this bug for?

Traceloop SDK

📜 Description

Telemetry is being sent to posthog regardless of explicitly being disabled.

👟 Reproduction steps

Enable debug logging, then explicitly disable telemetry.

export LOG_LEVEL=DEBUG
Traceloop.init(telemetry_enabled=False)

👍 Expected behavior

No traces should be sent to Posthog

👎 Actual Behavior with Screenshots

2025-07-25 10:36:55 [debug    ] https://us.i.posthog.com:443 "POST /batch/ HTTP/1.1" 200 15 [urllib3.connectionpool]

🤖 Python Version

3.11.12

📃 Provide any additional context for the Bug.

It looks like the Telemetry class is instantiated in multiple places aside from Traceloop.init and is enabled by default unless the environment variable is set:

    def __new__(cls) -> "Telemetry":
        if not hasattr(cls, "instance"):
            obj = cls.instance = super(Telemetry, cls).__new__(cls)
            obj._telemetry_enabled = (
                os.getenv("TRACELOOP_TELEMETRY") or "true"
            ).lower() == "true" and "pytest" not in sys.modules

👀 Have you spent some time to check if this bug has been raised before?

  • [x] I checked and didn't find similar issue

Are you willing to submit PR?

None

roger-collins-self avatar Jul 25 '25 14:07 roger-collins-self

@roger-collins-self can you verify if this issue still persists else feel free to close this ticket. Thanks !

elinacse avatar Dec 09 '25 09:12 elinacse

Closed by #3466

doronkopit5 avatar Sep 16 '26 17:09 doronkopit5