Skip to content

add tracing adapter behind optional feature flag#5

Merged
arferreira merged 2 commits intomainfrom
add-tracing-adapter
Jan 27, 2026
Merged

add tracing adapter behind optional feature flag#5
arferreira merged 2 commits intomainfrom
add-tracing-adapter

Conversation

@arferreira
Copy link
Collaborator

Description

  • Implements tracing_subscriber::Layer via SheenLayer so sheen can capture events from the tracing ecosystem
  • Any crate using tracing::info!(), tracing::warn!(), etc. gets routed through sheen's formatters
  • Gated behind an optional tracing feature flag (sheen = {features = ["tracing"] })
  • Updated README with tracing integration docs

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor

Checklist

  • cargo fmt ran
  • cargo clippy passes
  • cargo test passes
  • Updated README if needed

Closes #3 (partial)

@arferreira arferreira self-assigned this Jan 26, 2026
@arferreira arferreira added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 26, 2026
Cargo.toml Outdated
owo-colors = "4.2.3"
chrono = { version = "0.4.43", default-features = false, features = ["clock"] }
tracing = { version = "0.1.44", optional = true }
tracing-subscriber = { version = "0.3.22", optional = true }
Copy link

@MOZGIII MOZGIII Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to disable default features if you don't use them

Copy link

@MOZGIII MOZGIII left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good at a glance, but see also my comment on the log adapter PR. Also appies here.

Keep in mind that tracing also has a log adapter - so you might to figure out how to deal with this situation where there are both tracing and log features active but there's also a tracing's log adapter enabled.

Also, don't forget to bench - your adapters might be mich quicker or much slower then the original crates themselves - and it'd be good to know.

@arferreira
Copy link
Collaborator Author

Looks good at a glance, but see also my comment on the log adapter PR. Also appies here.

Keep in mind that tracing also has a log adapter - so you might to figure out how to deal with this situation where there are both tracing and log features active but there's also a tracing's log adapter enabled.

Also, don't forget to bench - your adapters might be mich quicker or much slower then the original crates themselves - and it'd be good to know.

Yeahh, I'm aware about that! Good catches. I also fixed default-features on the tracing deps. I have two APIs for testing it and benchmarking will be on the radar for a follow-up as well.

Signed-off-by: Antonio Souza <arfs.antonio@gmail.com>
Signed-off-by: Antonio Souza <arfs.antonio@gmail.com>
@arferreira arferreira merged commit 96738d8 into main Jan 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Other logging frontend adapters

2 participants