Skip to content

Distributed Tracing

IAD Server supports Distributed Tracing using the Correlation ID passed in the request header. These enhancements provide powerful tools for tracing and logging requests throughout their lifecycle. Designed to improve monitoring, troubleshooting, and debugging processes, these features allow you to track requests across multiple systems and services.

IAD Server utilizes two types of identifiers:

  • Correlation ID (correlation-id) - a unique identifier that should be included in each request to the server.
  • Session ID (session-id) - an identifier used to group multiple requests (each with its own Correlation ID) for the same user. This is particularly useful if the first requests fail for some reason. Multiple requests can share the same Session ID, so it is not unique to each request.

The server's logging framework includes both the Correlation ID and Session ID in log entries.

To make a request using cURL with the necessary headers, use the following command:

curl http://127.0.0.1:8080/check_capture_liveness --data-binary @/path/to/payload/encrypted-payload -H "Content-Type: application/octet-stream" -H "session-id:12345678" -H "correlation-id:87654321"

In this case, the log output may look like:

2024-05-27T13:29:45.927Z INFO 1 --- [iad-server] [nio-8080-exec-6] [12345678][87654321]i.i.c.InjectionAttackDetectionController : Result: ID = f7a27c1a-8b1a-4d79-91c5-bbffca7e0f75, PAD result = , IAD result = 0.0

The format of IDs in logs can be customized using the environment variable LOGGING_PATTERN_CORRELATION. For example:

docker run --env LOGGING_PATTERN_CORRELATION='[session-id=%X{session-id:-}, correlation-id=%X{correlation-id:-}] '  ...

In this case, the log output may look like:

2024-05-27T13:33:09.963Z  INFO 1 --- [iad-server] [nio-8080-exec-4] [session-id=12345678, correlation-id=87654321] i.i.c.InjectionAttackDetectionController : Result: ID = df003ffd-473a-4eff-9880-3e7addd4de3d, PAD result = , IAD result = 0.0