Avoid duplication in spans #457
-
SummaryIn my log I get the JSON shown below. I think my example is an exceptional case -- but I do see Is there a way to remove this duplication? {
"timestamp": "2024-01-11T10:25:19.621394Z",
"level": "DEBUG",
"fields": {
"message": "finished processing request",
"latency": "0 ms",
"status": 200
},
"target": "tower_http::trace::on_response",
"span": {
"requestId": "60495ea7-df49-4acf-8a69-2cd27d994da9",
"xrayTraceId": "...snipped...",
"name": "Lambda runtime invoke"
},
"spans": [
{
"requestId": "60495ea7-df49-4acf-8a69-2cd27d994da9",
"xrayTraceId": "...snipped...",
"name": "Lambda runtime invoke"
}
]
} tower-http version0.5.0 |
Beta Was this translation helpful? Give feedback.
Answered by
davidbarsky
Jan 11, 2024
Replies: 1 comment
-
Try setting Json::with_span_list xor Json::with_current_span to false. I personally recommend setting the latter to false, as it'd keep emitting parent more than the just the current span. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wduminy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try setting Json::with_span_list xor Json::with_current_span to false. I personally recommend setting the latter to false, as it'd keep emitting parent more than the just the current span.