Logging Request ID's and Correlation ID's

Troubleshooting can be hard. Especially with distributed systems such as use.id.

In order to help you with troubleshooting, we send custom headers with each HTTP response and allow you to sent those headers to each request. We log those custom headers to make troubleshooting a breeze.

Custom headers

use.id sends and accepts the following custom HTTP headers for each request:

  • X-Request-ID: A UUDv4 unique to that HTTP request and response combination.
  • X-Correlation-ID: A UUIDv4 unique over a series of requests and responses, identifying a transaction.

How to implement this?

If you want fast support for your incidents, we advise to do the following...

  • ... For each request that you send to us
    • Generate a new UUIDv4 Request ID and send it using the X-Request-IDheader.
    • Use the existing UUIDv4 Correlation ID of the transaction and send it using the X-Correlation-ID header. If there is no Correlation ID for the transaction, create one.
    • Log both ID's in your logging system.
  • ... For each response that you receive from us:
    • Log both X-Request-ID and X-Correlation-ID values.

FAQ

Is this common?

Yes. It is common to send these headers in distributed systems.

Should we really generate a new Request ID for each request and send this to you?

Yes. This is required because, otherwise, you cannot log this value yourself in case of e.g. a timeout. Suppose you don't send a X-Request-ID header to us, you cannot know the ID we've created for this when we fail to send a response.

What if I don't do this or send some random ID's for fun

We don't mind, but this will make it harder for us to help you and will result in more time to resolve incidents.