Kuadrant / Kuadrant/kuadrant-operator
Upgrade OpenTelemetry Rust crates to 0.32 across limitador and wasm-shim
- Dominant language
- Go
- Stars
- 94
- Forks
- 89
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 43
Description
## Summary
The OpenTelemetry Rust ecosystem has moved to 0.32 with breaking API changes. Both limitador and wasm-shim need a coordinated upgrade since they share the same tracing pipeline and are deployed together.
Dependabot opened PRs bumping `opentelemetry_sdk` alone ([limitador#495](https://github.com/Kuadrant/limitador/pull/495), [wasm-shim#384](https://github.com/Kuadrant/wasm-shim/pull/384)), but the otel crates use lockstep versioning — all must be bumped together.
## Target versions
| Crate | Current (limitador) | Current (wasm-shim) | Target |
|-------|-------------------|-------------------|--------|
| `opentelemetry` | 0.22.0 | 0.22.0 | 0.32 |
| `opentelemetry_sdk` | 0.22.1 | 0.31.0 | 0.32 |
| `opentelemetry-otlp` | 0.15 | 0.15 | 0.32 |
| `opentelemetry-stdout` | 0.3 | — | 0.32 |
| `tracing-opentelemetry` | 0.23 | 0.23 | 0.33 |
## Code changes required
### limitador (small — 2 files)
Only `limitador-server/src/main.rs` needs API changes:
- Replace `opentelemetry_otlp::new_pipeline().tracing()...install_batch()` with `SdkTracerProvider::builder().with_batch_exporter()`
- Replace `trace::config().with_resource(Resource::new(vec![...]))` with `Resource::builder()` pattern
- Update `TraceContextPropagator` import path
- Remove `opentelemetry_sdk::runtime::Tokio` arg (batch processor no longer needs async runtime)
`envoy_rls/server.rs` only uses `global` and `Extractor` — likely unaffected.
### wasm-shim (medium — 7 files)
Similar API changes plus:
- Custom `SpanProcessor` in `tracing/processor.rs` needs `on_start` signature update
- `SpanData` export trait changes in the OTLP exporter setup
- `KeyValue` iterator changes
## Checklist
- [ ] limitador: bump all otel crates, fix API changes, close [#495](https://github.com/Kuadrant/limitador/pull/495)
- [ ] wasm-shim: bump all otel crates, fix API changes, close [#384](https://github.com/Kuadrant/wasm-shim/pull/384)
- [ ] Verify tracing integration works end-to-end
## References
- [otel-rust 0.32 migration notes](https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/CHANGELOG.md)
- [SdkTracerProvider builder API](https://docs.rs/opentelemetry_sdk/latest/opentelemetry_sdk/trace/struct.SdkTracerProvider.html)
Contributor guide
Assessment
This issue has not been assessed yet.