Correlate database queries with Java traces
You can now view database query correlation with APM traces from the APM trace view or the Query details pane in the Database Monitoring Overview.
Splunk Observability Cloud
list_alt
This configuration must include the environment variable OTEL_INSTRUMENTATION_SPLUNK_JDBC_ENABLED set to true.
Example of setting the environment variable at the command line:
export OTEL_INSTRUMENTATION_SPLUNK_JDBC_ENABLED=trueExample Kubernetes deployment snippet:
apiVersion: apps/v1
kind: Deployment
spec:
selector:
matchLabels:
app: your-application
template:
spec:
containers:
- name: myapp
env:
- ...
- name: OTEL_INSTRUMENTATION_SPLUNK_JDBC_ENABLED
value: "true"
-javaagent option to enable instrumentation.java -javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar -jar data-ecosystem-java-app-1.0-SNAPSHOT.jarYou can now view database query correlation with APM traces from the APM trace view or the Query details pane in the Database Monitoring Overview.