chainlit
chainlit copied to clipboard
Don't set global OpenTelemetry providers
When I run my app with chainlit run, chainlit configures OTel and sets global tracer provider
https://github.com/Chainlit/chainlit/blob/6ec007032945dfd6a1a608cc3c8074bd2f643d0c/backend/chainlit/telemetry.py#L64-L69
As a result I cannot as a user configure my own OTel pipeline and export my telemetry to a different place. I can work it around with enable_telemetry = false.
But more importantly, https://github.com/Chainlit/chainlit/blob/6ec007032945dfd6a1a608cc3c8074bd2f643d0c/PRIVACY_POLICY.md?plain=1#L9-L18
this is not correct. All telemetry that my code or natively instrumented libraries report to OTel will be sent to that questionable endpoint.
If you want to collect your telemetry, report it on a dedicated tracer that's configured to export to your endpoint, but never ever set the global ones