Expose error.type and error.message

The apm captureException writes the hole stack to error.exception in json format.

But error.message ( from ecs ) is not filled.

It can be very helpful to have exception.type and exception.message for dashboarding issues.


Which APM agent are you using (Java, Python, Node.js, Go, Ruby, .NET, RUM)?

@suikast42 so, you get error.exception.message and error.exception.type but you would like to get the message also as error.message to conform to ECS?

java apm agent v 1.7.0

No I didn't . That's the exposed fileds by java agent


And the error.excpetion filed holds all the stack in json format.

I think it only looks this way in Discover, but these fields exist.
Try to do a query on them, or check you index mappings.

The mapping is ok. That fields have a mapping.
I can query them too.
the query error.message : * delivers empty result

Hi, it is expected behavior that error.message is not populated for APM data. Since an error can have an exception.message and a log.message those messages are stored in a nested way and we do not decide which of those messages would be most important to propagate them to top level.

I am not agree with that statement. I is a very helpful feature to now if a boundary invocation ( which captured by an apm transaction ) was exceptional or not.
Regardless from the exception logging.

You are welcome to open a feature request issue in the apm-server repo. If you do so, please add information about your use case and which logic you would expect to fill the error.message field with, considering all the available information of an error.

1 Like

Doesn't that stuff belongs to apm-java-agent ??

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