---
title: "Traceability"
description: "Traceability is essential for debugging and support. Every AgentSync API response includes a unique request identifier that allows you to track and correlate requests across systems."
url: "https://developer.agentsync.io/api-traceability"
image: "https://developer.agentsync.io/_og/d/c_Ocean.takumi,title_Traceability,description_Traceability+is+essential+for+debugging+and+support.+Every+AgentSync+API+response+includes+a+unique+request+identifier+that+allows+you+to+track+and+correlate+requests+across+systems.,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiMxODdFRkYifX19,p_Ii9hcGktdHJhY2VhYmlsaXR5Ig,s_tAWqNRRM0pJquZ0v.png"
---

# Traceability

Traceability is essential for debugging and support. Every AgentSync API response includes a unique request identifier that allows you to track and correlate requests across systems.

## [Request Identifier](#request-identifier)

The header name differs by API:

| API                                | Response header |
| :--------------------------------- | :-------------- |
| ProducerSync                       | X-Trace-ID      |
| Contracting, Hierarchies, Identity | DD-Trace-ID     |

```http
X-Trace-ID: <trace-id>
DD-Trace-ID: <trace-id>
```

Every response carries one, including error responses — capture it on failures, not just successes.

### [Correlating Your Own Traces](#correlating-your-own-traces)

On the Contracting, Hierarchies, and Identity APIs you can also **send** `DD-Trace-ID` on a request. When you do, that value is used instead of a server-generated one, so a single trace id can span your systems and ours:

```bash
curl -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "DD-Trace-ID: $YOUR_TRACE_ID" \
     "https://api.sandbox.agentsync.io/contracting/v2/producers"
```

This is the most reliable way to tie a failed request in your logs to ours when raising a support ticket.

## [Why It Matters](#why-it-matters)

-   **Debugging**: Helps pinpoint issues in logs and trace the lifecycle of a request.
-   **Support**: Speeds up resolution when you provide the trace ID to AgentSync’s support team.
-   **Correlation**: Enables linking API calls with internal monitoring or distributed tracing tools.

## [Best Practices](#best-practices)

-   **Log the trace ID**: Capture the `X-Trace-ID` in your application logs for every API call.
-   **Include in error reports**: When exceptions occur, attach the trace ID to error messages.
-   **Provide to support**: Always share the trace ID when opening a support ticket to expedite troubleshooting.
-   **Use in monitoring tools**: Integrate the trace ID with observability platforms (e.g., Datadog, Splunk) for end‑to‑end request tracking.