pinpoint-apm/pinpoint · warning

Failed to insert exceptionMetaData

Error message

Failed to insert exceptionMetaData

What it means

OtlpTraceExportService.export saves each ExceptionMetaDataBo through exceptionMetaDataService.save (when the service is configured); a thrown exception increments exceptionInsertErrorCounter and logs this throttled warning. Unlike span/agentInfo failures this is NOT counted toward serverErrorCount, so the export result still reports success.

Solutions

  1. Check the throttled stack trace for the storage backend root cause.
  2. Verify the exception-metadata backend connectivity and table/collection schema.
  3. If exception metadata is not needed, disable the service bean so the loop is skipped entirely.
  4. Note this failure is not reflected in serverErrorCount — monitor exceptionInsertErrorCounter metrics separately.
Defensive patterns

Strategy: try-catch

Validate before calling

if (exceptionMetaDataService == null || otlpTraceMapperData.getExceptionMetaDataBoList().isEmpty()) {
    return; // optional feature disabled or nothing to save
}

Try / catch

try {
    exceptionMetaDataService.save(exceptionMetaDataBo);
} catch (Exception e) {
    exceptionInsertErrorCounter.increment();
    logger.warn("Failed to insert exceptionMetaData (non-fatal, not counted in serverErrorCount)", e);
}

Prevention

When it happens

Trigger: exceptionMetaDataService.save(exceptionMetaDataBo) throws for any entry in otlpTraceMapperData.getExceptionMetaDataBoList() during export — only when the exception metadata service bean is configured.

Common situations: Exception metadata storage (e.g. Pinot/HBase backend) down or misconfigured; optional service not enabled but still throwing; schema mismatch after upgrade.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/09e97c51b20ba70a. Report an issue: GitHub.

Appendix: source

Thrown at otlptrace/otlptrace-collector/src/main/java/com/navercorp/pinpoint/otlp/trace/collector/service/OtlpTraceExportService.java:188

                try {
                    agentInfoService.insert(agentInfoBo);
                    applicationIndexV2Service.insert(DEFAULT_SERVICE_UID, agentInfoBo);
                    agentIdCache.put(agentInfoBo.getAgentId(), Boolean.TRUE);
                } catch (Exception e) {
                    agentInfoErrorCount++;
                    agentInfoInsertErrorCounter.increment();
                    throttledLogger.warn("Failed to insert agentInfoBo", e);
                }
            }
        }

        if (exceptionMetaDataService != null) {
            for (ExceptionMetaDataBo exceptionMetaDataBo : otlpTraceMapperData.getExceptionMetaDataBoList()) {
                try {
                    exceptionMetaDataService.save(exceptionMetaDataBo);
                } catch (Exception e) {
                    exceptionInsertErrorCounter.increment();
                    throttledLogger.warn("Failed to insert exceptionMetaData", e);
                }
            }
        }

        // Optional statistics side channel: a uriStat failure must not fail the trace export, so it
        // is not counted toward serverErrorCount (spans are already stored at this point).
        if (uriStatService != null) {
            try {
                uriStatService.store(otlpTraceMapperData.getUriStatSpanList());
            } catch (Exception e) {
                uriStatInsertErrorCounter.increment();
                throttledLogger.warn("Failed to insert uriStat", e);
            }
        }

        final int serverErrorCount = insertErrorCount + agentInfoErrorCount;
        return new OtlpTraceExportResult(clientRejected, serverErrorCount, buildServerMessage(insertErrorCount, agentInfoErrorCount));
    }

View on GitHub (pinned to 744c3d3075)