Splunk AppDynamics

Spring Data no JDBC calls captured

CommunityUser
Splunk Employee
Splunk Employee

Hello,

I am setting up AppD on my fairly-vanilla Spring app, and it's not showing any DB calls on any of my transactions:

  • Spring Boot 1.5.3
  • Spring Data JPA
  • Spring Data REST
  • PostgreSQL
  • running in GKE/K8S using Google Cloud SQL Postgres

I checked the Bytecode transformer logs, and it's happily finding the classes: 

[main] 11 Apr 2018 21:39:00,175  INFO - 		Applying method interceptor exit.jdbc.Connect at org/postgresql/Driver.connect ((Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;) id:597

But no DB calls are detected in any of my traces, neither reads nor writes.

Anything obvious I could be missing? 

Thanks!

Labels (1)
0 Karma
1 Solution

Peter_Holditch
Builder

Josh,

The fact that you see the Connect instrumentation applied is encouraging!  Do you also see instrumentation applied for callable statements, prepared statements etc.?

If not, you may be using a version of the Postgres jdbc driver that is not covered by the out of the box agent configuration.  In this case, you can configure the implementation classes to to picked up using the relevant jdbc-* agent properties.

If it happens that you're using v9.4+ of the Postgres driver, the settings should be:

jdbc-statements: value="org.postgresql.jdbc.PgStatement"
jdbc-connections: value="org.postgresql.jdbc.PgConnection"
jdbc-prepared-statements: value="org.postgresql.jdbc.PgPreparedStatement"
jdbc-callable-statements: value="org.postgresql.jdbc.PgCallableStatement"

If this isn't the issue, then another possibility is that the jdbc activity is happening on a thread that has not been tracked by the agent.  You can tell if this is the case using the uninstrumented code detection feature, and configure the missing thread handoffs in the agent's fork-config configuration, or the thread-correlation-classes agent property.

Warm regards,

Peter.

View solution in original post

0 Karma

Peter_Holditch
Builder

Josh,

The fact that you see the Connect instrumentation applied is encouraging!  Do you also see instrumentation applied for callable statements, prepared statements etc.?

If not, you may be using a version of the Postgres jdbc driver that is not covered by the out of the box agent configuration.  In this case, you can configure the implementation classes to to picked up using the relevant jdbc-* agent properties.

If it happens that you're using v9.4+ of the Postgres driver, the settings should be:

jdbc-statements: value="org.postgresql.jdbc.PgStatement"
jdbc-connections: value="org.postgresql.jdbc.PgConnection"
jdbc-prepared-statements: value="org.postgresql.jdbc.PgPreparedStatement"
jdbc-callable-statements: value="org.postgresql.jdbc.PgCallableStatement"

If this isn't the issue, then another possibility is that the jdbc activity is happening on a thread that has not been tracked by the agent.  You can tell if this is the case using the uninstrumented code detection feature, and configure the missing thread handoffs in the agent's fork-config configuration, or the thread-correlation-classes agent property.

Warm regards,

Peter.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

manually setting those node properties got everything working, thanks! (though you may want to fix the auto-detection)

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...