-
Notifications
You must be signed in to change notification settings - Fork 624
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
Add support for OTEL_LOG_LEVEL env variable #1059
Comments
I'll take this up. |
Thanks! |
There is ongoing discussion about what the values for this should look like, or whether this variable should even exist right now in opentelemetry/opentelemetry-specification#920. |
This issue was marked stale due to lack of activity. It will be closed in 30 days. |
Hello, I recently realized that the open telemetry instrumentation is logging formatted JSON objects instead of JSON lines. In the context of:
We get broken logs in Elasticsearch, because Filebeat is indexing each line of the JSON document separately (because each line ends with a Is there a way to tell opentelemetry-python to log in JSON lines? The issue comes from
indent parameter of json.dumps must not be passed when running inside a Kubernetes pod with a log collector that expects JSON lines.
It would be ideal to get the control over both the logging level and the logging format. For the logging indent, adding a new Thank you! |
I think you are mixing different things here. The
Are you using the |
@JPLachance Could you please open a new issue for what you're reporting? Looks like we are talking about different things here :) |
Hello, We use the That fallback made me fell into a rabbit hole. My bad 🤦🏼 |
As there was a question on the linked PR #1069 I will post a quick update here. I wanted to wait for the open spec issue opentelemetry-specification#920 regarding standardising the logging variables to be resolved before implementing yet another languages specific solution. There haven't really been any updates on that issue and at this point some languages have had their own solution for long enough that I think we can just implement our own as well. As I don't have time right now, feel free to reassign if someone wants to drive this issue. If we decide on implementing an otel-python specific solution it should be easy enough to implement. |
Is the original issue of supporting Looks like #1069 was never merged. I can take this up as I'm looking to get started on this project. |
Yes, this is still open. The author of #1069 didn't have the time to re-work the PR after many changes got made to codebase. |
Given that there has been no updates on standardization of the logging levels in specifications, open-telemetry/opentelemetry-specification#920 since @ffe4 worked on this last, I still don't see a clear path forward here. Given that in the other languages (js and java from the thread ^) implemented what is most sensible as per the respective language, and python sdk is still not respecting the We will likely have to make changes to this once again when there is a consensus reached on open-telemetry/opentelemetry-specification#920 on language independent/numeric logging levels. cc : @srikanthccv |
I think we can start by supporting |
Are you sitll working on this? |
Related autoinstrumentation pr: #4203 |
The spec describes environment variables that should be supported to configure the log level, this feature request is to add support in the current implementation.
https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sdk-environment-variables.md
The text was updated successfully, but these errors were encountered: