Why OpenTelemetry does not recommend logging to console or stdout? #5389
-
Hello, I see following message on console log exporter:
Best practice related to logging is to log to stdout. I see following downsides related to non-stdout logging:
My logs could be collected on node and then sent to opentelemetry collector via infrastructure component. OpenTelemetry .Net Sdk takes different approach - what is the motivation behind that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I believe this is more like a question to the OpenTelemetry spec, rather than a question to OpenTelemetry .NET implementation. OTel spec has as stdout exporter, but the spec never made an opinion or specification for how the output should be. Each languages follow their own format, and there is no guarantee that each language will not change its output format. This makes it difficult/impossible for one to use this for any automatic processing. Also see #5372
This maybe true in certain scenarios, but not something OTel spec has recommended. Infact, the default exporter for OTel instrumented apps is the OTLP Exporter. An OTel Collector could of course output to stdout. OTel .NET's console exporter is paired with simpleprocessors (this was the case even before spec clarified that this should be the case!) and is highly unlikely that such a system will perform well for production workloads. |
Beta Was this translation helpful? Give feedback.
I believe this is more like a question to the OpenTelemetry spec, rather than a question to OpenTelemetry .NET implementation. OTel spec has as stdout exporter, but the spec never made an opinion or specification for how the output should be. Each languages follow their own format, and there is no guarantee that each language will not change its output format. This makes it difficult/impossible for one to use this for any automatic processing. Also see #5372
This maybe true in certain scenarios, but not something OTel spec has recommended. Infact, the default exporter…