Skip to content
Discussion options

You must be logged in to vote

You need to use .make_span_with on the TraceLayer to add the custom fields to the span (see this example), then use Span::current().record("field", value) in the middleware to set its value.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by BenJeau
Comment options

You must be logged in to vote
2 replies
@davidpdrsn
Comment options

@BenJeau
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants