dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

Kafka consumer Traces/Spans with errors not being reported to error tracking or marked as error on APM

Open LukeDDC opened this issue 2 years ago • 0 comments

I have followed the solution of this other issue so the traces/spans of my Kafka consumer inherit my service name. it works, but the problem is that when the spans have an error they are not reported on Error Tracking and does not are counted in the errors metric in APM.

Image 1 trace reported: trace-blured

Image 2 APM dashboard: apm-blured

Looking in the span info (image 3) you can see that it has an error, but the properties error. stack and error.type does not exist, and error.message contains a generic message besides the fact that the trace has an error with the message and stacktrace (image 4).

Image 3 span info: span-blured

Image 4 error reported for the trace: error-blured

I don't know if this is the expected behavior, but it seems odd to me and I think they should be reported to Error Tracking and counted on the errors metric in APM.

Also, have a doubt about what happens when two different services consumes the same event and both of them use the solution reported in the issue. Each service will have a trace that only contains spans of its consumption or it will contain spans of both consumptions?

Thanks for your help and if you need more data let me know.

spring-boot version: 2.6.7 dd-trace-api version: 1.1.4 spring-kafka 2.8.11 -Ddd.kafka.legacy.tracing.enabled=false

LukeDDC avatar Dec 13 '22 18:12 LukeDDC