-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 stdoutlog exporter #5055
Comments
Are we planning to just follow the metric STDOUT exporter here and accept some kind of encoder? |
Not necessary. I am against having an encoder interface like in stdoutmetric which does not even take the io.Writer into consideration. We could accept an interface like |
Can you fill out the description of this issue with what is needed in the initial version? It's pretty blank currently 😉 |
I wonder what is the reason for having a |
I think that the main idea of using stdout exporter is to have it working with io.Writer that can set via WithWriter. Personally, I do not see a good reason to provide such customization. One can always create its own exporter. Can we start with an implantation that only has WithWriter, WithPrettyPrint and WithoutTimestamps options like https://pkg.go.dev/go.opentelemetry.io/otel/exporters/stdout/stdouttrace? |
I feel like we only treat the Do you think we might end up having a full-function logging exporter, like the slog? So, we can provide native OTel logging without importing contrib libs (or other third-party libs). We can also reduce the log model transform at least once, as our logging implementation uses our own log model. |
This is indeed one of its main use cases.
Can please you elaborate? The SDK allows adding a custom logging exporter. Am I missing something? Or do you mean that you would like Logs SDK to export logs the slog? If so it is possible to create an exporter that would emit logs to slog.
Just for reference, Logs Bridge API should not be used directly.
Right now, I would encourage users to use In future, users would be also able to use Events API to emit events without importing third-party libs.
This is why propose adding JSON marshaling to the |
Create a
go.opentelemetry.io/otel/exporters/stdout/stdoutlog
module providing a logs console exporter.The exporter should have options
WithWriter
,WithPrettyPrint
andWithoutTimestamps
like https://pkg.go.dev/go.opentelemetry.io/otel/exporters/stdout/stdouttrace.We may want to add JSON marshaling to the
go.opentelemetry.io/otel/sdk/log.Record
type.WithoutTimestamps
is set #5175The text was updated successfully, but these errors were encountered: