Incorrect Error Grouping

Kibana version : 7.5.1
Elasticsearch version : 7.5.1
APM Server version : 7.5.1
APM Agent language and version : Node.JS 3.3.0
Original install method : Elastic Cloud

Some of our errors being incorrectly grouped together. It seems the errors that get grouped together have the same error class (standard Node.JS Error) and the same stacktrace ([1] i.e. an external service may produce multiple different errors which we then turn into an Error class which would have the same stacktrace). The error messages are completely different. This is a large problem as we are not being correctly notified about error groups through Watcher & we have to manually go into Discover to view the error log messages to work out the correct error grouping.

Some of the errors are being grouped correctly (different stacktraces) even when the error message has an id that varies (i.e. my product had a problem (id: "f37i87") which is great.

My Go isn't too great but it looks like a fair amount of the grouping relies on the stacktrace and error class:

I can provide an example of some of the incorrectly grouped errors if required but would only be able to do this privately.

Is there a better way to handle [1] (above) to enable correct error grouping?

Many thanks, Matthew

Hi @Matthew_Petrie,
the APM Server generally supports sending an error.exception.cause which should point to the original error. If this information was sent up, the grouping keys would differ based on different causes. Unfortunately the nodejs agent does not yet support sending causes.

You were mentioning that error messages differ. If any other information is given, then such messages are not considered in the grouping key logic, to avoid creating unique keys per IDs or names. Since in your case the errors provide a stacktrace the messages are ignored.
Looking at the nodejs agent's API I was wondering if it were an option for you to send the error message as parameterized message which would be considered in the grouping key logic.

1 Like

Yes this should work - thanks, appreciated! :slight_smile:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.