DataDog / dd-trace-java

Datadog APM client for Java
https://docs.datadoghq.com/tracing/languages/java
Apache License 2.0
570 stars 283 forks source link

Can't get detailed information from gRPC interceptors because of absence of Span.log() #4592

Open reify-tanner-stirrat opened 1 year ago

reify-tanner-stirrat commented 1 year ago

I noted that Span.log() isn't supported in this library.

We were hoping to use the java-grpc opentracing interceptor for this, but it uses Span.log() under the hood to mark particular points of interest in the gRPC call.

Is there a reason that Span.log() isn't supported? Is there a way to get around this limitation in order to get better introspection into java gRPC calls?

nayeem-kamal commented 1 year ago

Hi @reify-tanner-stirrat , according to the documentations span.log() is available in a limited capacity:

Note: Span.log() is a generic OpenTracing mechanism for associating events to the current timestamp. The Java Tracer only supports logging error events. Alternatively, you can set error tags directly on the span without log():

Is there a specific error you ran into when using the java-grpc opentracing interceptor?

reify-tanner-stirrat commented 1 year ago

The opentracing implementation doesn't use error logs to mark the points of interest in a gRPC-traced span, which (to my understanding) means they will never show up in Datadog's traces. That's my issue - it's not that there are errors being thrown by the opentracing interceptor.