DefaultProblemDetailsFactory.cs - traceId vs. traceparent #29588
Unanswered
hannahchan
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
@shirhatti thoughts? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Since .NET 5, ASP.NET by default surfaces RFC 7807 - Problem Details responses that look like the following.
{ "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1", "title": "An error occurred while processing your request.", "status": 500, "traceId": "00-3304f15e4d65e147815f694ffa6162e6-19fbdea7fac6df4c-01" }The value in the
traceIdfield is now a W3C Trace Contexttraceparentheader which contains as one of its parts, atrace-id. In the above example, thetrace-idis3304f15e4d65e147815f694ffa6162e6.To avoid potential confusion, should the field
traceIdbe renamed totraceparent?Alternatively, is it to better to surface the actual
trace-idportion oftraceparentas the value of thetraceIdfield? For example;{ "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1", "title": "An error occurred while processing your request.", "status": 500, "traceId": "3304f15e4d65e147815f694ffa6162e6" // Displays only the trace-id portion of traceparent }I was originally going to raise this as an issue but it's not really breaking anything that I know of at the moment. I'm just being a little pedantic. Either way it would be nice to know what the thought process behind this was.
Beta Was this translation helpful? Give feedback.
All reactions