BitDive Java Producer is a Java agent and Spring integration library that collects runtime execution data for BitDive. It instruments Java applications at method level, captures HTTP and DB calls, builds distributed traces, and sends the collected data to the BitDive backend.
- Instruments code with ByteBuddy at runtime
- Captures method calls, parameters, results, exceptions
- Captures HTTP client and server calls
- Captures JDBC queries and timings
- Propagates trace id and span id across services
- Buffers data locally and uploads it in batches
- Integrates with Spring Boot through auto configuration
- Collects JVM metrics
- Allows selective monitoring through annotations
java-producer-parent
├─ perf-monitoring-producer core agent and instrumentation
├─ perf-monitoring-producer-spring-2.7 Spring Boot 2.7 support
├─ perf-monitoring-producer-spring-3 Spring Boot 3 support
└─ examples sample apps
- Automatic method tracing
- HTTP client and server hooks
- JDBC hooks for queries and timings
- Kafka producer and consumer hooks
- Thread context propagation with trace id and span id
- Auto configuration for Spring Boot
- AOP aspects for repositories, Feign, Kafka, schedulers
- Full integration with Spring context lifecycle
- Instrumented code records events
- Events are formatted into trace segments
- Segments are written to local files
- Upload service sends batches to BitDive backend
Add the dependency from Maven:
<dependency>
<groupId>io.bitdive</groupId>
<artifactId>perf-monitoring-producer</artifactId>
<version>YOUR_VERSION</version>
</dependency>For Spring Boot:
<dependency>
<groupId>io.bitdive</groupId>
<artifactId>perf-monitoring-producer-spring-3</artifactId>
<version>YOUR_VERSION</version>
</dependency>Create a file bitdive-config.yml in your resources:
service:
name: my-service
module: user-api
monitoring:
captureArguments: true
captureResults: true
upload:
endpoint: https://bitdive.io/api/ingest
batchSize: 2000@MonitoringClassenables monitoring for a class@NotMonitoringdisables monitoring for specific methods
These are optional. The agent works automatically without them.
- Spring Boot 2.7 and 3
- Servlet API
- RestTemplate and Feign
- JDBC
- Kafka
- Thread pools and executors
mvn clean package
See full BitDive docs:
https://bitdive.io/docs