bevyengine / bevyengine/bevy

Allow setting tracy format_fields_in_zone_name to false

Open
#21,960 0 comments 0 reactions 0 assignees View on GitHub
A-Diagnostics C-Feature D-Modest S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Sometimes, bevy apps, especially those using `bevy::log::tracing::instrument`, may run into the issue that tracy spans are not comparable due to the fact rust tracy client includes arguments in span names by default. You can find an example of this issue in the original PR to the rust tracy client [here](https://github.com/nagisa/rust_tracy_client/pull/87)

## What solution would you like?

the tracy client config https://docs.rs/tracing-tracy/latest/tracing_tracy/trait.Config.html#method.format_fields_in_zone_name allows putting arguments in some metadata other than the zone name, making tracy aggregate the spans again.

Bevy should provide some way this setting can be enabled.

## What alternative(s) have you considered?

Enable it by default

## Additional context

this might help with tracy sometimes running into a "source location limit" error, but i wasnt able to verify this

Contributor guide

Open the contributing guide

Research direction

Start by reading Bevy's bevy::log tracing integration and the tracing-tracy Config::format_fields_in_zone_name documentation, then inspect how tracing::instrument spans are configured. Done means Bevy provides a way to set this option to false and verifies that configured Tracy spans no longer include fields in their zone names.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability, performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.