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

Add span tags dynamically #199

Closed
0xd34d10cc opened this issue Feb 2, 2024 · 0 comments · Fixed by #200
Closed

Add span tags dynamically #199

0xd34d10cc opened this issue Feb 2, 2024 · 0 comments · Fixed by #200

Comments

@0xd34d10cc
Copy link
Contributor

tracing::instrument supports following use case:

// This function does a very interesting and important mathematical calculation.
// Suppose we want to record both the inputs to the calculation *and* its result...
#[instrument(fields(result))]
pub fn do_calculation(input_1: usize, input_2: usize) -> usize {
    // Rerform the calculation.
    let result = input_1 + input_2;

    // Record the result as part of the current span.
    tracing::Span::current().record("result", &result);

    // ... etc ...
}

Is it possible to implement similar feature in minitrace?

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

Successfully merging a pull request may close this issue.

1 participant