Request Tracing

The tracing of requests allows you to find slow requests and analyze where those requests spend time (e.g., on which internal or external system a request spends time or is waiting).

Engine Cockpit

You can activate and analyze the request tracing in the Slow Requests view of the Engine Cockpit.

Logging

If you experience poor performance, you can log the individual requests to the Axon Ivy Engine log by setting the level of the request performance logger in [engineDir]/configuration/log4j2.xml:

1<?xml version="1.0" encoding="UTF-8"?>
2<Configuration>
3   <Loggers>
4    <!-- logs the start and the end of a request -->
5    <Logger name="ch.ivyteam.ivy.performance.request" level="all" />
6  </Loggers>
7</Configuration>

This will create a log entry when the request has been received by the internal web server and when the request has been processed with the time spent for processing.

A unique request identifier requestId is assigned to every request. This can be used to find out what the Axon Ivy Engine did while processing the request.

Example:

[2020-09-15 11:17:29.621][DEBUG][ch.ivyteam.ivy.performance.request][http-nio-8080-exec-10]{requestId=61}
Entry url=http://localhost:8080/system/ client=127.0.0.1 session=4 httpsession=71902C0036745F320CAAD55AFA85A281
[2020-09-15 11:17:29.630][DEBUG][ch.ivyteam.ivy.db][http-nio-8080-exec-10]{requestId=61, client=127.0.0.1, executionContext=SYSTEM}
Execute database statement SELECT * FROM IWA_ACCESSCONTROL 
[2020-09-15 11:17:29.630][DEBUG][ch.ivyteam.ivy.db][http-nio-8080-exec-10]{requestId=61, client=127.0.0.1, executionContext=SYSTEM}
Executed database statement successfully in 0 milli seconds 
[2020-09-15 11:17:29.637][DEBUG][ch.ivyteam.ivy.performance.request][http-nio-8080-exec-10]{requestId=61}
Exit url=http://localhost:8080/system/ client=127.0.0.1 session=4 httpsession=71902C0036745F320CAAD55AFA85A281 took 16ms

The example above shows the log messages when the request with id 61 has entered and exited the web server. During the request a database SELECT statement has been executed. The whole request has been processed in 16 ms.

Request Tracing Tools

You can use a external tracing tool that propagates a trace id in a HTTP header. In that case, Axon Ivy will re-use the given trace Id as its requestId. This allows you to aggregate log entries from different systems using the requestId. Axon Ivy Engine supports the following HTTP headers:

HTTP Header

Tool/Standard

traceparent

W3C Trace Context

uber-trace-id

Jaeger

b3

Zipkin

X-B3-TraceId

Zipkin

X-Amzn-Trace-Id

Amazon X-Ray

ot-tracer-traceid

Open Tracing

For a deeper integration with a tracing tool have a look at our Jaeger Tracing (Jaeger and OpenTelemetry) example.