stalwartlabs / mail-server

Secure & Modern All-in-One Mail Server (IMAP, JMAP, POP3, SMTP)
https://stalw.art
4.86k stars 198 forks source link

[enhancement]: add opentelemetry-appender-tracing #297

Closed devpikachu closed 2 months ago

devpikachu commented 6 months ago

Which feature or improvement would you like to request?

Currently, if switching tracing from a file to OTel, we lose logs as they're not delivered by default, and the spans themselves contain not too much information on their own.

Adding https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-appender-tracing/README.md would be beneficial in this regard.

Is your feature request related to a problem?

No response

Code of Conduct

mdecimus commented 6 months ago

This has been implemented already:

https://github.com/stalwartlabs/mail-server/blob/5756815e3e11f42d7e200873b57ed2a5db84adca/crates/common/src/lib.rs#L220

On version 0.7.0 it will be possible to have multiple tracers at the same time.

devpikachu commented 6 months ago

@mdecimus Thanks for the reply! Whilst having the ability to use multiple tracers at once does provide workarounds to this, I don't think this is a solution to what I describe in the issue.

With multiple tracers one could send OTel traces to a collector, and then handle the logs separately through something like Promtail.

Having said that, logs are still not going to be delivered through the OTel pipeline without the appender linked above.

mdecimus commented 6 months ago

Thanks for clarifying, reopening.