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

The header name differs by API:

APIResponse header
ProducerSyncX-Trace-ID
Contracting, Hierarchies, IdentityDD-Trace-ID
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

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:

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

  • 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

  • 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.