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

[BUG] Stacktrace not really helpful (setTagError)

Open lsgndln opened this issue 2 years ago • 3 comments

I am using a grpc server with datadog tracing. The issue I have is with the stacktrace, in case of a panic. I am getting this stacktrace wich is not really helpful since it contains setTagError.

Screenshot 2023-02-13 at 16 24 40

I am using a recovery interceptor grpc.UnaryServerInterceptor. In this function, I have access to the correct stacktrace (where the error is coming from). Could I somehow attach this original stacktrace to the span ? Screenshot 2023-02-13 at 16 27 40

Version of dd-trace-go v1.47.0

Describe what happened:

The issue is that I get the stacktrace from the tracer package itself, not from where the error was created.

Describe what you expected: I would expect to get the proper stacktrace, from where the error/panic originated.

Steps to reproduce the issue:

Additional environment details (Version of Go, Operating System, etc.): Go : 1.18 / OS : osx

lsgndln avatar Feb 13 '23 15:02 lsgndln

Still facing the same issue with versions

gopkg.in/DataDog/dd-trace-go.v1 v1.69.0 go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/trace v1.31.0

Actual error stacktrace is getting replaced/overwritten by otel's internal stacktrace and in my case I am also not able to set and send any extra attributes and neither am I able to set exception type in this

@lsgndln were you able to find any solution regarding this ?

agentCalculator avatar Apr 14 '25 09:04 agentCalculator

Still facing in dd-trace-go: v2.2.3

Any updates on this? @agentCalculator @lsgndln You got any workaround for this?

gpstrange-tyke avatar Sep 15 '25 13:09 gpstrange-tyke

Hello, and thank you all for your patience! This is a known issue with how errors are generated in Go, but we are actively working on a fix for this that will work with Orchestrion. We'll keep you updated!

hannahkm avatar Sep 15 '25 20:09 hannahkm