Skip to content

Is tracing intended to be used as I am using it? How can I trace errors chain? #2329

Answered by hawkw
frederikhors asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not familiar with the async-graphql library, but it looks like the tracing event is being emitted by that library in this case. The event is at the INFO level rather than the ERROR level because that library's authors chose to record the event at INFO: https://github.com/async-graphql/async-graphql/blob/ad05baf79aea55a0827291abf55af5ce7cc8d386/src/extensions/tracing.rs#L146-L148

Similarly, the reason the tracing event includes only the top-level error message is because the async-graphql authors chose to write

error = %err.message(),

when emitting the tracing event I linked above. That code is saying "record a field named error whose value is err.message(), formatted using fmt::Display.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@frederikhors
Comment options

@hawkw
Comment options

@frederikhors
Comment options

@hawkw
Comment options

@hawkw
Comment options

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