elastic / elastic/apm-agent-nodejs

Customizable error grouping

Open
#391 3 comments 1 reaction 0 assignees View on GitHub
agent-nodejs enhancement
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

**Is your feature request related to a problem? Please describe.**
There are situations when one function may throw many different errors. For example when doing a simple HTTP request, the error message may contain a reason why the request failed. There are dozens of possible reasons and errors for all/most are thrown at the exact same place in the source code, which causes them being grouped as one error.

The problem is that while some of those errors might be low priority or even expected, other might be important and indicate errors in the app code. Since all of those are grouped, and only the most recent error message is shown in the UI (or most frequent? not sure), there's no way to tell if there isn't a different and more important error buried on the 10th page of the error details list.

**Describe the solution you'd like**
I think the best solution would be to allow setting a list of additional error properties which are used to compute the error grouping key. Alternatively `captureError()` could allow passing a custom key in the options.

Both of those solutions would also allow you to prevent grouping errors from different services, which I would like to do as well (although that's possible using filters in Kibana too).

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.