[apm] Question to event.outcome relationship between transaction and span

Kibana version: 7.16.3

Elasticsearch version: 7.16.3

APM Server version: 7.16.3

APM Agent language and version: Java 1.30

Browser version: Chrome 110.0.5481.100

Original install method (e.g. download page, yum, deb, from source, etc.) and version: SpringBoot - Application JRE11 (2.6.13) with maven

Hello all,

I am currently having a hard time understanding the assignment of the event.outcome field for a transaction of type http-request.

From your point of view, what should be the value of the event.outcome field of a transaction when our microservice makes a REST call to another microservice and the microservice acknowledges the request with HTTP.NOT_FOUND (code 404)? The REST call is captured in a span below the transaction.

If I understand the documentation (apm/tracing-instrumentation-http.md at main · elastic/apm · GitHub) correctly, then in the above case the span must be set to event.outcome: failure.

What does this then mean for the parent transaction above it - event.outcome:failure?

The question arises for us because we see in our data that the transaction is set to event.outcome: success even though a span listed below it has been assigned event.outcome: failure.

Thank you for some feedback!

Kind regards,
Thilo

Hi @dacothe , welcome to our forum !

For HTTP transactions and spans, the outcome depends on the status code and side of the HTTP request.

  • when a service is receiving an HTTP request (service provides an HTTP endpoint), the 4xx errors are considered to be client-side errors, thus are not failures
  • when a service is making an HTTP request (service uses an HTTP client), the 4xx errors and 5xx errors are failures.

This behavior is defined in agent specification, with examples in agent tests

Hi Sylvain,

That sums it up - thank you for this clear explanation!

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