Skip to content

Bump opentelemetry to latest version #3037

@tillrohrmann

Description

@tillrohrmann

We are currently using opentelemetry 0.27 whereas the latest version is 0.29. In order to benefit from bug fixes and performance improvements, we should try to upgrade. The biggest hurdle right now is our usage of the injecting service names as done by UserServiceModifierSpanExporter and RuntimeModifierSpanExporter. The current implementation requires a keeping the inner span exporter within a std::sync::Mutex. However, with the latest version, the SpanExporter trait changed to no longer return a BoxFuture<'static, ..> when calling export but a normal future. This future (with Rust edition 2025) now captures &self. Therefore, we can no longer use std::sync::Mutex because the guard would be kept around during an await point which violates the Send bound. A solution is to use Tokio's Mutex, however, it's known to be slower than std::sync::Mutex.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions