Open paco-spr opened 22 hours ago
Hi @paco-spr , thank you for taking the time to repot this. This is indeed a bug in our library and indeed you could use the workaround (span as DDSpan).setResourceName
to go around this problem. We are going to open a ticket on our end to fix this in the next SDK versions. On the other hand I am wondering if you've noticed our new release of OpenTelemetry
support: https://docs.datadoghq.com/tracing/trace_collection/custom_instrumentation/android/otel/?tab=kotlin. I recommend you on the long term to try to switch to this new API as this will be better maintained in the future and this bug is not there in this newer implementation.
Hi @paco-spr , thank you for taking the time to repot this. This is indeed a bug in our library and indeed you could use the workaround
(span as DDSpan).setResourceName
to go around this problem. We are going to open a ticket on our end to fix this in the next SDK versions. On the other hand I am wondering if you've noticed our new release ofOpenTelemetry
support: https://docs.datadoghq.com/tracing/trace_collection/custom_instrumentation/android/otel/?tab=kotlin. I recommend you on the long term to try to switch to this new API as this will be better maintained in the future and this bug is not there in this newer implementation.
I had not seen that. Thanks for confirming the bug and suggesting the new API we will update on our end as well.
Describe the bug
Using a tag to set the resource name does not work and instead shows up as the operation name in the datadog ui. This comes from a bug in this library and even has a TODO comment to resolve it. In DDSpanContext
getResourceName
does not read the "resource.name" set in the tags, but it does read it when returning a value forhasResourceName
. You can work around this by casting the span toDDSpan
and setting the resource name usingspan.setResourceName()
but this seems like a bug in the library.https://github.com/DataDog/dd-sdk-android/blob/b1d6ebb82d26299faa41195747198850dcef090d/features/dd-sdk-android-trace/src/main/java/com/datadog/trace/core/DDSpanContext.java#L404
Reproduction steps
Logcat logs
No response
Expected behavior
No response
Affected SDK versions
2.14.0
Latest working SDK version
never
Did you confirm if the latest SDK version fixes the bug?
Yes
Kotlin / Java version
No response
Gradle / AGP version
No response
Other dependencies versions
No response
Device Information
No response
Other relevant information
No response