You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been searching for the best way to use the semantic attribute constants when creating spans without manually typing out the values in the span macro.
I have only been able to get my desired behavior by manually typing the keys:
I would ideally like to be able to use the available attribute constants when creating a span, so that if one of the conventions is deprecated I will see when I update. But I know it would require updates to the tracing macros.
I guess the solution I am looking for would be a recommended way to leverage the constants when creating spans. Or maybe some examples of how the attributes should be used.
Considered Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Specifying constants as field names - I believe this is valid question, probably better to be asked in the tokio tracing repo? There are no examples with tracing integration in this repo for reason mentioned here - #1571.
Just to add, regarding HTTP semantic conventions (as you added that in example), these semantic conventions are stable , and so won't get deprecated in future.
Specifying constants as field names - I believe this is valid question, probably better to be asked in the tokio tracing repo? There are no examples with tracing integration in this repo for reason mentioned here - #1571.
Just to add, regarding HTTP semantic conventions (as you added that in example), these semantic conventions are stable , and so won't get deprecated in future.
Thank you for the reply! That makes sense, I will close this issue.
Also just in case someone else stumbles on this, I found a solution that works for creating new spans. but not for tracing::info!(...), etc
Related Problems?
I have been searching for the best way to use the semantic attribute constants when creating spans without manually typing out the values in the span macro.
I have only been able to get my desired behavior by manually typing the keys:
I would ideally like to be able to use the available attribute constants when creating a span, so that if one of the conventions is deprecated I will see when I update. But I know it would require updates to the tracing macros.
ex:
Describe the solution you'd like:
I guess the solution I am looking for would be a recommended way to leverage the constants when creating spans. Or maybe some examples of how the attributes should be used.
Considered Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: