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

Dynamic control over tracing-flame span name #2934

Open
jsouto18 opened this issue Apr 10, 2024 · 2 comments
Open

Dynamic control over tracing-flame span name #2934

jsouto18 opened this issue Apr 10, 2024 · 2 comments

Comments

@jsouto18
Copy link

Feature Request

Allow for dynamic control over the written span name.

Crates

tracing-flame

Motivation

Currently tracing span names must be 'static. In the use case of running tracing spans over tests configured dynamically we're limited to the same span name.

Proposal

I believe this can be implemented without breaking changes by:

  • Adding a new field to the Config struct defining the name of the span field to be considered as the span name replacement. Here
  • Capturing this field if present and replacing the name write call. Here

I see no drawback for this implementation as of now.

I'm also happy to come up with the PR if this is accepted as a useful feature 😁

@mladedav
Copy link
Contributor

To be clear, what you're proposing is to only change the output of tracing-flame span name, right?

So for example fmt would still output the 'static name and the span names may not be the same for tracing-flame output and other outputs if overridden, right?

@jsouto18
Copy link
Author

Correct @mladedav!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants