Open lvitaly opened 1 year ago
OpenTelemetry also solves this using a ProxyConnectionFactory: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/r2dbc-1.0/library/README.md
Hoping this can be added to dd-trace-java as well!
Any chance there's an update on this? It'd be really nice to have r2dbc support in our DataDog traces, since the current behavior spawns a new trace id every time an r2dbc operation is performed.
Do you have a workaround to avoid generating a new trace id each time ? I have the same issue.
Any updates or work arounds for this issue?
Hello 👋 Brian from Datadog here
Unfortunately, there are no updates on R2DBC support at this time. That being said, we'll be sure to update this issue when we make progress
Any chance there's an update on this? It'd be really nice to have r2dbc support in our DataDog traces, since the current behavior spawns a new trace id every time an r2dbc operation is performed.
Have you found any workaround?
Any chance there's an update on this? It'd be really nice to have r2dbc support in our DataDog traces, since the current behavior spawns a new trace id every time an r2dbc operation is performed.
Have you found any workaround?
Not yet unfortunately. Still hoping for full support for r2dbc at this point 🤞
Hi - since 1.38.1 you can now add the OTel R2DBC instrumentation at runtime to dd-java-agent
: https://docs.datadoghq.com/opentelemetry/interoperability/instrumentation_libraries/?tab=java
For example:
# this demo requires Java 21 and Maven 3 on your PATH
git clone https://github.com/eugenp/tutorials
cd tutorials/spring-reactive-modules/spring-reactive-data
curl -L -O https://github.com/DataDog/dd-trace-java/releases/download/v1.38.1/dd-java-agent-1.38.1.jar
curl -L -O \
https://repo1.maven.org/maven2/io/opentelemetry/javaagent/instrumentation/opentelemetry-javaagent-r2dbc-1.0/2.5.0-alpha/opentelemetry-javaagent-r2dbc-1.0-2.5.0-alpha.jar
mvn spring-boot:run \
-Dstart-class=com.baeldung.pagination.PaginationApplication \
-Dspring-boot.run.jvmArguments="-javaagent:dd-java-agent-1.38.1.jar \
-Ddd.trace.otel.enabled=true \
-Dotel.javaagent.extensions=opentelemetry-javaagent-r2dbc-1.0-2.5.0-alpha.jar"
Open http://127.0.0.1:8080/products to exercise the product query - you should see R2DBC spans in the Datadog UI
Note that we currently only support versions up to 2.5.0-alpha of the R2DBC instrumentation. This is because in 2.6.0-alpha OTel refactored some of the instrumentation config classes and we need to adjust our mappings to account for that.
R2DBC project reached 1.0 release and already has support for popular databases such as Oracle, PostgreSQL, MySQL, H2, MsSQL, and MariaDB. R2DBC provides a nice feature for observability as r2dbc-proxy. But anyway, it would be nice to have instrumentation out of the box.
https://r2dbc.io