-
Notifications
You must be signed in to change notification settings - Fork 893
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 OTLP stdout exporter #4183
Add OTLP stdout exporter #4183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about standard error and and file as output destinations? |
|
The linked issue is about OTLP File exporter, but this seems to talking about stdout exporter... Did I misread this? |
otlp-stdout is part of the file exporter |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@cijothomas can you check again? |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
still working on the pr |
As discussed with @zeitlinger, this capability to export standardized OTel logs in files that can be seamlessly ingested by the OTel Collector is a major improvement for OTel logs. That being said, I would be interested in understanding better the developer experience, how this Taking the example of a Java Spring Boot developer, I'll typically use the default logs configuration that emits unstructured logs in stdout (example below) and, if I want to modify this, I'll modify this config through Spring's If I want to modify the stdout output of my Spring Boot application to adopt OTel JSON logging to replace the unstructured logs,
I think that Elastic has done this very well with the Elastic ECS Logging framework. In addition to a manual config, Elastic has an experimental config flag I'm wondering if we could start with implementing a few extensions of popular logging frameworks (LogBack, Log4j, Pino...) that developers would manually use in their logs config.This could be a natural extension of the OTLP gRPC and HTTP appenders we have implemented so far (eg [here](Appender Instrumentation for Logback version 1.0 and higher I would imagine to the following developer experience for Spring Boot app:
<configuration>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<!-- below is just an idea, don't copy paste this fragment -->
<encoder class="io.opentelemetry.....OtlpJsonEncoder">
</appender>
...
<root level="INFO">
<appender-ref ref="console"/>
</root>
</configuration> Example Spring Boot console logs (Spring docs here):
|
I feel this is a bad direction for OpenTelemetry in general.
From inefficiencies in some languages, to issues with polling for that data, it's just not something that we should push for when we have a lot of alternatives like OTLP and collector, that are part of the OpenTelemetry project. All the requests I've seen from this in the .NET world have been from people not wanting to move from other technologies like fluent etc. and not that it's a better way to work. I can understand a desire to have a console logging output that formats the log line with the template to produce the human readable string, but not one who's purpose is to provide a format for other tools to use. This will fragment the ecosystem further than it already is. Right now, we have a path that we push people down. Use the OTLP exporter to push data to an endpoint that accepts OTLP. If we push down this route as a production usecase, that will become diluted with vendors saying "use our agent and configure OpenTelemetry to push to stdout", and still claim that they support OpenTelemetry. Especially if this is then supported for Metrics and Traces too. That will actively harm OpenTelemetry as a project, when we're trying make the developer experience better. |
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
c04a392
to
ec135dd
Compare
@cijothomas done |
Co-authored-by: Cyrille Le Clerc <cyrille@cyrilleleclerc.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good step forward for users, but I also have concerns around efficiency and scalability of serialized JSON to file. I think we CAN do much better, but let's not block progress for perfection.
Towards #3817
Changes
Add OTLP Stdout exporter.
For non-trivial changes, follow the change proposal process.
* [ ] Related OTEP(s) #CHANGELOG.md
file updated for non-trivial changes* [ ]spec-compliance-matrix.md
updated if necessary