APM Errors showing as "N/A" when using Java agent log_sending=true (errors coming from logs)

Versions

  • Kibana version: 9.2.2
  • Elasticsearch version: 9.2.2
  • APM Server version: 9.2.2 (via Fleet integration)
  • APM Agent language and version: Java agent 1.55.2
  • Browser version: Chrome (latest)

Installation

  • Original install method: Docker + Fleet / Elastic Agent
  • Fresh install or upgraded: Fresh install

Setup specifics

  • Fleet with custom policies to enable the APM integration

  • Java APM agent configured with:

    log_sending: true
    

    to enable log ingestion and APM correlation


Description of the problem

In Kibana → APM → Errors, I see multiple error entries where the error title is displayed as N/A.

Expected behavior

  • Errors should display a meaningful message (exception name / message)
  • No duplicated errors between APM-captured exceptions and log-based errors

Actual behavior

  • Errors coming from logs appear in APM with:

    • Title: N/A
    • error.id = null
    • Missing exception fields (e.g. exception.name, exception.message)
  • These errors are listed alongside “real” APM errors, creating duplicates and noise


Investigation details

After investigating the documents causing the N/A entries:

  • All problematic errors come from logs, not from APM exception capture

  • They have:

    event.dataset = file | console
    
  • They are generated by application logs such as:

    logger.error("message", exception);
    
  • These log entries are:

    • Interpreted as APM errors
    • Missing exception metadata
    • Not associated with an error.id

This results in:

  • N/A being displayed in the APM Errors UI

  • Duplicate error entries:

    • One from APM exception capture
    • One from log ingestion (log_sending=true)

Summary of issues

  • N/A errors are caused by log-based errors without exception fields
  • Log entries with event.dataset = file | console are interpreted as APM errors
  • Missing exception.* fields cause the UI to display N/A
  • This creates duplicates and noisy error lists
  • error.id is null for these entries

Questions

  1. Is this expected behavior when using log_sending=true with the Java APM agent?

  2. Is there a recommended way to:

    • Prevent log-based errors from appearing in APM → Errors, or
    • Ensure they are enriched with proper exception fields?
  3. Is there a configuration or pipeline adjustment to avoid these duplicates?


Logs / Errors

  • Browser console: no relevant UI errors
  • Elasticsearch documents show error.id = null for affected entries