APM Agent language and version:
Java / 1.11.0
Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.
DB2 (z/os)
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Only the first query gets traced. No warnings are generated.
Steps to reproduce:
- Create a minimal Spring boot 2 application
- Add Ibm JDBC v4 drivers as dependency
- Create a DB2 (z/os) Datasource
- Create a scheduled bean, that invokes a simple query (e.g. select 1 from sysibm.sysdummy1) using prepared statement
- Start application with java-agent attached
Are there known issues with jdbc tracing?
Source code for reproducing:
@RequestMapping("/hello")
@RestController
public class TestController {
private DataSource ds;
public TestController() {
DB2SimpleDataSource ds = new DB2SimpleDataSource();
ds.setServerName("db2.com");
ds.setPortNumber(5100);
ds.setDatabaseName("DB2DB");
ds.setUser("DB2USER");
ds.setPassword("DB2PASS");
ds.setFetchSize(10);
ds.setDriverType(4);
this.ds = ds;
}
@GetMapping
public String hello() throws Exception {
try (Connection c = ds.getConnection();
PreparedStatement ps = c.prepareStatement("select 1 from sysibm.sysdummy1", ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
ResultSet rs = ps.executeQuery()) {
rs.next();
}
return "hello";
}
@Scheduled(fixedDelay = 1000)
public void scheduled() throws Exception {
hello();
}
}