elastic / elastic/apm-agent-nodejs

add section for "missing transactions and spans" to troubleshooting doc

Open
#2,192 0 comments 0 reactions 0 assignees View on GitHub
agent-nodejs docs
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

As discussed on https://github.com/elastic/apm-agent-nodejs/issues/2186 it is possible for the APM agent to drop events when hitting maxQueueSize because:

1. APM server is slow or offline (compared to the burst of tracing events from the user app); and/or
2. the burst of tracing events is large enough that the APM agent's serialization and sending can't keep up (this is the case in the example script in #2186 that shows a, perhaps contrived, case where near 1000 transactions and spans end at about the same time)

It would be good to have a troubleshooting doc section on this. Some notes for that:

- Mention the `maxQueueSize` var for this.
- *Perhaps* mention the internal/unstable/don't-want-to-promise `_getStats()` that tracks number of dropped events.
- The agent could perhaps [emit a warning](https://nodejs.org/api/all.html#process_process_emitwarning_warning_options) to the user the first time it detects any events were dropped, by periodically checking those internal stats. That would make it more obvious to the user that they might want to dig in.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.