Check:
- The Spring starter dependency is present.
- The application is a servlet MVC or reactive WebFlux web application.
bugdna.enabledis notfalse.bugdna.log-enabledis notfalse.- Error logging is enabled for
io.github.bugdna.spring.BugDnaExceptionLogger.
Automatic capture covers unhandled Spring MVC and WebFlux web exceptions. It does
not cover non-web background exceptions or reactive errors consumed by
onErrorResume, onErrorReturn, or another local recovery operator. Use
BugDnaSpringService or FailureTracker manually for those paths.
try {
runBackgroundTask();
} catch (RuntimeException failure) {
Fingerprint fingerprint = bugDna.fingerprint(failure);
log.error("Background task failed [{}]", fingerprint.getId(), failure);
}Check:
spring-boot-starter-webfluxis present.- The application type is reactive, not servlet.
bugdna.enabledandbugdna.log-enabledare notfalse.- The error reaches the global WebFlux exception chain.
Errors handled locally do not reach the automatic handler:
return operation()
.doOnError(bugDna::fingerprint)
.onErrorResume(this::fallback);When both MVC and WebFlux dependencies are present, Spring Boot commonly selects
the servlet application type unless spring.main.web-application-type=reactive is
configured.
Confirm core BugDNA auto-configuration is enabled. The bean is not created when:
bugdna.enabled=falseApplications may also provide their own FailureTracker bean.
MDC keys are present only during BugDNA's automatic log call and are removed
afterward. Include %X{bugdna} in the logging pattern:
logging.pattern.console=%-5level [%X{bugdna}] %logger{36} - %msg%nDirect calls to BugDna.generate(...) do not modify MDC.
Creating an endpoint and exposing it are separate steps:
management.endpoints.web.exposure.include=health,bugdnaAlso verify that Spring Boot Actuator is on the classpath.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>Then test the endpoint directly:
curl -i http://localhost:8080/actuator/bugdnaCheck that:
- A Micrometer
MeterRegistrybean exists - The Prometheus registry dependency is installed
- The Prometheus endpoint is exposed
- At least one failure has been recorded
Prometheus names use underscores:
bugdna_failures_total
bugdna_unique_failures
Required registry dependency:
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>Verify the raw endpoint:
curl http://localhost:8080/actuator/prometheusThis is expected after restart. Trackers, recent snapshots, and metrics are all in-memory. Export metrics to monitoring storage when historical retention is needed.
Class names, method names, and normalized call paths affect identity. Compare the
fingerprints with BugDiff.compare(...) or BugSimilarity.compare(...).
FingerprintDiff diff = BugDiff.compare(firstFailure, secondFailure);
System.out.println(diff.explain());
Similarity similarity = BugSimilarity.compare(
BugDna.generate(firstFailure),
BugDna.generate(secondFailure)
);
System.out.println(similarity.getExplanation());Run Maven with errors enabled:
mvn -e clean testIf the error names repo.maven.apache.org, test Maven Central from the same machine:
curl -I https://repo.maven.apache.org/maven2/Then check the Spring Boot BOM version configured in the root pom.xml:
<spring-boot.version>4.0.6</spring-boot.version>Corporate proxy or repository-mirror settings belong in ~/.m2/settings.xml. A
401 or 403 usually indicates repository credentials or mirror policy; a DNS or
connection timeout indicates network or proxy configuration.