open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.18k stars 753 forks source link

[feature request] Enhance Console Exporter for less performance impact similar to .net core console logger #5844

Closed willsmithgithub closed 1 week ago

willsmithgithub commented 1 week ago

Package

OpenTelemetry.Exporter.Console

Is your feature request related to a problem?

The built in .net console logger features a robust queue and a dedicated thread to send output to the console. The benefit is little to no performance impact to the logging app under high logging output. Output is buffered basically. The depth of the queue is configurable. Here is the internal class that uses a BlockingCollection:

https://github.com/dotnet/runtime/blob/362d4988310f8c4d9ed5efd91f96c6a9ecce9304/src/libraries/Microsoft.Extensions.Logging.Console/src/ConsoleLoggerProcessor.cs

A robust console exporter is useful because some applications monitoring tools capture std i/o and that IS the integration point.

What is the expected behavior?

Performance benchmarks should show a small overhead to the callers of using the console exporter.

Which alternative solutions or features have you considered?

Write my own exporter implementation for .net core 8.

Additional context

No response

TimothyMothra commented 1 week ago

Hi @willsmithgithub, The Console Exporter isn't intended for production workloads. This is for testing and learning. As such, we're not planning any changes.

https://github.com/open-telemetry/opentelemetry-dotnet/blob/1c01770882bb5113ff308b2b4398347fab6e0404/src/OpenTelemetry.Exporter.Console/README.md?plain=1#L9-L11