# Distributed Tracing

Distributed tracing in ThousandEyes provides end-to-end visibility across your application stack. It works by automatically injecting standard trace headers into API, HTTP server, page load, and transaction tests. This lets you correlate network performance issues with application traces in a supported observability backend.

## Create a ThousandEyes Test with Distributed Tracing

Before setting up any distributed tracing integration, create a ThousandEyes test with distributed tracing enabled:

1. Create a test in ThousandEyes that supports distributed tracing. For more information on creating a test, see [Getting Started with Cloud and Enterprise Agent Tests](https://docs.thousandeyes.com/product-documentation/getting-started/getting-started-with-cloud-and-enterprise-agent-tests).
2. Under **Advanced Settings**, enable **Distributed Tracing**. ![Enable Distributed Tracing](https://1112912342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4QARF6s57qxMrOHDTZ%2Fuploads%2Fgit-blob-7dea9b0a797c3dbe2e4c8daa98c755db9325b152%2Fenable-distributed-tracing.png?alt=media)
3. ThousandEyes automatically injects the following trace headers into requests:

   * `b3`
   * `traceparent`
   * `tracestate`

   ![Request Headers](https://1112912342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4QARF6s57qxMrOHDTZ%2Fuploads%2Fgit-blob-4cdaac542ae5eae364746c468d856085600761f5%2Frequest-headers.png?alt=media)

   This lets ThousandEyes capture the trace ID of the request (for example, `0a0c3e94ca224a898f43038e8e99519a`).

## Monitored Endpoint Requirements

The monitored endpoint must meet the following requirements:

* Accept HTTP headers.
* Be instrumented with OpenTelemetry.
* Propagate trace context.
* Send traces to your observability backend.

{% hint style="warning" %}
Do not use a web page URL with distributed tracing. Browsers do not accept custom trace headers.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thousandeyes.com/product-documentation/integration-guides/custom-built-integrations/distributed-tracing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
