DataDog / dd-trace-java

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

Unable to capture gRPC list field in dynamic instrumentation #7254

Open robmillersoftware opened 3 months ago

robmillersoftware commented 3 months ago

I've got a Java gRPC service running in our k8s cluster, and I'm trying to validate the message data we're receiving using a dynamic probe to check the values in field of type com.google.protobuf.DoubleArrayList. However, when I go to check the logs from the probe I'm running into the following error:

java.lang.RuntimeException: Unsupported Collection type: com.google.protobuf.DoubleArrayList

Below is a screenshot of the Stacktrace section image

jpbempel commented 3 months ago

Hi @robmillersoftware , the DoubleArrayList is considered as a collection (because implements Collection interface) but we are restricting the access of the collection outside of the JDK classes because an external collection could implement the interface and notably the size method by doing something that could be very expensive (SQL call for example). However in that case we should fallback to regular object to capture fields instead.

Thanks for having reporting this!