< Back

Request Tracking

Each API request processed by Health Gorilla includes a unique identifier to support tracing, monitoring, and debugging. You can also supply your own identifier to correlate logs across systems.

System and Client Identifiers

Health Gorilla supports two primary headers:

  • X-Hg-Request-Id: A UUID generated by the server and returned in every API response. This ID is recorded internally and used for support and diagnostics.
  • X-Request-Id: An optional UUID you can include with your request. This ID is echoed in the response and helps you correlate logs across distributed systems.

If both IDs are present, the response also includes a correlation header:

  • X-Correlation-Id: A mapping of X-Request-Id:X-Hg-Request-Id, useful for linking your system’s trace ID to Health Gorilla’s.

Example Response Headers

X-Hg-Request-Id: 8f7d9012-3fcd-4e8b-9f21-9c1c3c9de45d
X-Request-Id: 123e4567-e89b-12d3-a456-426614174000
X-Correlation-Id: 123e4567-e89b-12d3-a456-426614174000:8f7d9012-3fcd-4e8b-9f21-9c1c3c9de45d

Implementation Guidance

  • Always include a unique X-Request-Id header using UUID v4 format.
  • Log X-Hg-Request-Id, X-Request-Id, and X-Correlation-Id in your application logs.
  • Retain request IDs in audit logs and include them in support tickets.
  • Do not reuse the same request ID for different operations.

Including trace headers is optional but strongly recommended in production environments.