Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set tracing static level for binaries only #2144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kim
Copy link
Contributor

@kim kim commented Jan 20, 2025

Disabling tracing (features = ["release_max_level_off"]) at the
workspace level prevents library users from using tracing at all.
Instead, set the feature for each binary individually.

Also change all but one #[instrument] macros to be at "trace" level,
which will prevent code gen unless the static level is at trace. This is
because most of them were introduced for tracy tracing, and may be at
"hot" code locations.

Fixes: #2117

Expected complexity level and risk

1

Testing

Build the proprietary edition with this patch and confirm logs emitted via the
tracing crate's macros are output. Both from public and proprietary code.

Disabling tracing (`features = ["release_max_level_off"]`) at the
workspace level prevents library users from using tracing at all.
Instead, set the feature for each binary individually.

Also change all but one `#[instrument]` macros to be at "trace" level,
which will prevent code gen unless the static level is at trace. This is
because most of them were introduced for `tracy` tracing, and may be at
"hot" code locations.

Fixes: #2117
@bfops bfops added the release-any To be landed in any release window label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-any To be landed in any release window
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reenable tracing and change the log level of existing instrument tracing to trace
2 participants