Related Problems?
Hi,
We just migrated Stalwart from opentelemetry 0.25 to 0.29 and noticed two issues that I briefly explained in #2260:
- We use our custom logging backend rather than tracing and
global::set_error_handler has been removed.
- We also use run own own span, log and metrics export task and the
Default trait has been removed from SdkLogRecord. In order to be able to generate a SdkLogRecord we now need to do SdkLoggerProvider::builder().build().logger("stalwart").create_log_record() which is not awful but it would be much nicer if SdkLogRecord::new was made public or the Default trait was added.
Describe the solution you'd like:
I propose to:
- Re-implement
global::set_error_handler (or similar) and place it behind a Cargo feature, which will be disabled by default. I agree that most users will use tracing.
- Make
SdkLogRecord::new public or add the Default trait to SdkLogRecord.
I'm not familiar with the internals of this crate but if you prefer I can submit a PR for these.
Considered Alternatives
No response
Additional Context
No response
Related Problems?
Hi,
We just migrated Stalwart from opentelemetry
0.25to0.29and noticed two issues that I briefly explained in #2260:global::set_error_handlerhas been removed.Defaulttrait has been removed fromSdkLogRecord. In order to be able to generate aSdkLogRecordwe now need to doSdkLoggerProvider::builder().build().logger("stalwart").create_log_record()which is not awful but it would be much nicer ifSdkLogRecord::newwas made public or theDefaulttrait was added.Describe the solution you'd like:
I propose to:
global::set_error_handler(or similar) and place it behind a Cargo feature, which will be disabled by default. I agree that most users will usetracing.SdkLogRecord::newpublic or add theDefaulttrait toSdkLogRecord.I'm not familiar with the internals of this crate but if you prefer I can submit a PR for these.
Considered Alternatives
No response
Additional Context
No response