OpenTracing instrumentation for Neo4j Driver 4.x.
pom.xml
<dependency>
<groupId>io.opentracing.contrib</groupId>
<artifactId>opentracing-neo4j-driver</artifactId>
<version>VERSION</version>
</dependency>
// Instantiate tracer
Tracer tracer = ...
// Decorate Neo4j Driver with Tracing Driver
Driver driver = new TracingDriver(GraphDatabase.driver(...), tracer);
// Create BoltDriver from decorated neo4j driver:
Driver boltDriver = new BoltDriver(new TracingDriver(GraphDatabase.driver(...), tracer));
// Create Session Factory
SessionFactory sessionFactory = new SessionFactory(boltDriver);