---
title: "Using HTTP request IDs"
date: "2024-02-14T06:18:38+00:00"
summary: "Streamline troubleshooting with HTTP request IDs. Learn how to correlate log entries across multiple files, diagnose issues faster, and improve your web application's performance on Cloud Platform."
image:
type: "page"
url: "/acquia-cloud-platform/using-http-request-ids"
id: "ed311b28-acab-4308-82c3-f45a93a39298"
---

When Cloud Platform receives a web request, it assigns each request a unique request ID, in the HTTP header `X-Request-ID`, and preserves that request ID across multiple log files. The HTTP request ID can help you diagnose problems by correlating log entries for a given web request across many log files, which otherwise would not contain a common piece of information. Even on a busy website, the HTTP request ID in the log files makes it easy to correlate various log entries with each other.

For example, having the HTTP request ID in the PHP error log is helpful because it will also appear in the Apache request log, enabling you to identify the page request that generated the PHP error. After identifying the page request, you can more easily reproduce the bug causing the issue.

The HTTP request ID is recorded with the `request_id=""` syntax in all logs directly related to the request, including the following log files:

*   [Apache access logs](/acquia-cloud-platform/monitor-apps/logs/apache-access)
*   [Drupal request logs](/acquia-cloud-platform/monitor-apps/logs/drupal-requests)
*   Varnish® request log
*   [Fpm access logs](/acquia-cloud-platform/monitor-apps/logs/fpm-access)
*   [PHP error logs](/acquia-cloud-platform/monitor-apps/logs/php-error)

Web requests can access the HTTP request ID using the `$_ENV['HTTP_X_REQUEST_ID']` [environment variable](/acquia-cloud-platform/develop-apps/env-variable).

The HTTP request ID is 20 to 200 characters long, and includes only the following characters:

*   `a-z` (lowercase)
*   `A-Z` (uppercase)
*   `0-9`
*   `+` (plus sign)
*   `/` (slash mark)
*   `=` (equal sign)
*   `-` (minus sign)

Note

You can provide your own `X-Request-ID` header in your application, and Cloud Platform will use the value you supply.

Related topics
--------------

*   [Varnish headers](/acquia-cloud-platform/performance/varnish/headers)
*   [Analyzing the Drupal request log](/acquia-cloud-platform/performance/request-log)
*   [Using environment variables](/acquia-cloud-platform/develop-apps/env-variable)
*   [About Cloud Platform logging](/acquia-cloud-platform/monitor-apps/logs)