refactor(tracing): decouple OTel support into adapter crate#765
Open
JohnTitor wants to merge 1 commit into
Open
refactor(tracing): decouple OTel support into adapter crate#765JohnTitor wants to merge 1 commit into
JohnTitor wants to merge 1 commit into
Conversation
JohnTitor
marked this pull request as ready for review
June 20, 2026 23:04
JohnTitor
commented
Jun 20, 2026
Member
Author
There was a problem hiding this comment.
OTel users would have to migrate like this example. I guess it's not that painful.
| /// headers and attach it to the root [`tracing::Span`]. | ||
| /// | ||
| /// [`TracingLogger`]: crate::TracingLogger | ||
| pub trait TraceContext: Clone + 'static { |
Member
Author
There was a problem hiding this comment.
This is for adapter crate. One bonus point, users can alternatively implement their desired backend if want.
| @@ -0,0 +1,25 @@ | |||
| [package] | |||
| name = "tracing-actix-web-opentelemetry" | |||
| version = "0.32.0" | |||
Member
Author
There was a problem hiding this comment.
I'm going to match the version here with opentelemetry.
| --tests --examples --bins -- | ||
| -A unknown_lints -D clippy::todo -D clippy::dbg_macro | ||
|
|
||
| - name: Check tracing-actix-web with Clippy |
Member
Author
There was a problem hiding this comment.
This is something I want to remove by this change :>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Refactor
PR Checklist
cargo +nightly fmt).Overview
This is an attempt to remove the OTel features to support. Currently it becomes harder and harder to maintain, and old versions should be quite lower usage than newer's.
This decouples the part of code which implements OTel support as another adapter crate so that we can versioning them independently. The new adapter crate matches the OTel crate version so users can easily expect what version they should use.
And the main crate can contain any functional changes independently so users can find combination they want (e.g. users can use the latest core crate feature + older OTel).
cc @LukeMathWalker this is kinda drastic change and would love to hear your inputs if you have!