-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose TLS/Insecure params via Logfire config #136
Comments
Are they needed now? |
@Kludex I'm testing logfire in a lab without internet access, so basically using it for sending the OTEL data to a local tool that ingests. I can do this using I have a setup use vanilla opentelemetry-sdk, just trying to replace it all with logfire. |
Ah, I see the conversation on slack: https://pydanticlogfire.slack.com/archives/C06EDRBSAH3/p1714527101176449 Yep, PR is welcome! :) |
I will give it a try this week, figure creating a formal ticket would help :-) |
We use HTTP, specifically For the certificate, you can set the Alternatively, since you already have a vanilla OTEL setup, you presumably you have a span processor somewhere in there. You can use it like so: logfire.configure(processors=[my_span_processor], send_to_logfire=False) |
@gaby is @alexmojaki 's solution enough for you? We can try to improve documentation (not sure where that would fit yet). |
@Kludex I'm not sure if ths solves the problem. While I can set the ENV via python, it's not as clean/ideal as using params for Cert/Key/CA. The insecure part, I have to double check. I'm trying to get rid of all the vanilla OpenTelemetry since code looks cleaner with Logfire. Maybe I can open a ticket in OpenTelemetry for them to add the insecure param on the SDK |
It was explicitly removed in open-telemetry/opentelemetry-python#1649, I think having it was against the spec. |
@alexmojaki I see their point, if certs are set there's no need for the insecure flag. Totally valid. From a logfire perspective, being able to specify cert/key/ca params would be useful. Currently using the ENV variables is doable, just not very pythonic. |
Description
Add support for sending data to a URL that uses a self-signed cert and also support for specifying TLS cert/key/ca.
I believe the HTTP exporter from OpenTelemetry has a param
insecure
for doing this. This is not exposed as part of LogfireConfig. There's also params for specifying cert/key/ca.https://opentelemetry.io/docs/specs/otel/protocol/exporter/
These params are mostly needed for sending data to self-hosted endpoints or a self-hosted Logfire in the future.
The text was updated successfully, but these errors were encountered: