> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Traces

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

This topic explains how to use the observability **Traces** page to view OpenTelemetry trace data stored in LaunchDarkly.

An OpenTelemetry trace is a record of activity for a request that your application processes. Traces show how a given request flows through different services or components. Each trace consists of multiple spans, where each span represents a single operation or step taken to process a request. Spans include attributes such as a span name, duration, and related context.

The **Traces** page helps you filter available trace spans by querying the span attributes you choose. It provides a main chart to help you aggregate and visualize the individual spans returned by your query.

<Frame caption="The Traces page with an example query and chart.">
  <img src="https://mintcdn.com/launchdarkly/7dOLLfhGme_BglBp/images/__LD_UI_no_test/traces.png?fit=max&auto=format&n=7dOLLfhGme_BglBp&q=85&s=845a1a68d2efb90e17fdf89364f530a3" alt="The Traces page with an example query and chart." width="968" height="796" data-path="images/__LD_UI_no_test/traces.png" />
</Frame>

Select tabs at the bottom of the **Traces** page to display raw data for the results of your query:

* **Overview** shows the grouped aggregation values associated with the chart display.
* **Spans** shows one row for each span in your query result.
* **Traces** shows one row for each trace that contains spans from your query result.

In the **Spans** or **Traces** tab, hover over an entry in the first column to view options for displaying details about the selected row. Select **Open** to view full trace details associated with the span or trace, or select the **Vega** icon to add the span or trace to a Vega prompt.

You can also open a service's details panel from either tab. In the **Spans** tab, click a service name in the "Service Name" column. In the **Traces** tab, click a service name in the "Root service" column. To learn more, read [Service details](/docs/home/observability/service-details).

<Frame caption="A detailed view of a trace span.">
  <img src="https://mintcdn.com/launchdarkly/7dOLLfhGme_BglBp/images/__LD_UI_no_test/traces-details.png?fit=max&auto=format&n=7dOLLfhGme_BglBp&q=85&s=c30ff8e8a0339394d31a676de5c4d4b7" alt="A detailed view of a trace span." width="1033" height="806" data-path="images/__LD_UI_no_test/traces-details.png" />
</Frame>

## Get started

To instrument your application to capture traces, read the documentation on [Observability SDKs](/docs/sdk/observability). The functionality is available through plugins to the LaunchDarkly JavaScript SDK.

To ingest OpenTelemetry traces from other source, read [Observability integrations](/docs/home/observability/integrations) and configure your application to use the LaunchDarkly observability endpoints.

To view available traces, open the **Telemetry** section and navigate to the **Traces** list.

## Search

To learn more about the search specification for the **Traces** view, read [Search specification](/docs/home/observability/search).

When you search on the **Traces** view, the following behaviors apply by default:

* The default search [key](/docs/home/observability/search#keys-and-values) is `span_name`. For example, if you enter an expression without a key, such as `search-term`, then LaunchDarkly automatically expands that to `span_name=*search-term*`.

### Search attributes

By default, the [observability SDK plugin](/docs/sdk/observability) automatically injects the following attributes to provide additional help with searching for traces:

<table>
  <thead>
    <tr>
      <th>Category</th>
      <th>Attribute</th>
      <th>Description</th>
      <th>Example</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Feature flag</td>
      <td>`feature_flag`</td>
      <td> Produces a list of spans that are associated with a feature flag. You can refine results with the following additional attributes: `context.id`, `contextKeys`, `key`, `provider.name`, `result.reason.inExperiment`, `result.reason.kind`, `result.value`, `set.id`, and `.variant`.</td>
      <td>`true`</td>
    </tr>

    <tr>
      <td>Service or application</td>
      <td>`environment`</td>
      <td>The environment key, based on the SDK credentials used in the [Observability SDKs](/docs/sdk/observability).</td>
      <td>`production`</td>
    </tr>

    <tr>
      <td />

      <td>`secure_session_id`</td>
      <td>Session ID that contains the span.</td>
      <td>`wh1jcuN5F9G6Ra5CKeCjdIk6Rbyd`</td>
    </tr>

    <tr>
      <td />

      <td>`service_name`</td>
      <td>Name of the service specified in the SDK plugin. To learn more, read [Versioning sessions and errors](/docs/sdk/features/observability-config-client-side#versioning-sessions-and-errors).</td>
      <td>`private-graph`</td>
    </tr>

    <tr>
      <td />

      <td>`service_version`</td>
      <td>Version of the service specified in the observability SDK plugin. To learn more, read [Versioning sessions and errors](/docs/sdk/features/observability-config-client-side#versioning-sessions-and-errors).</td>
      <td>`e1845285cb360410aee05c61dd0cc57f85afe6da`</td>
    </tr>

    <tr>
      <td>Trace properties</td>
      <td>`duration`</td>
      <td>Time length of the span. Defaults to nanoseconds. Use `s`, `m`, or `h` suffixes to designate seconds, minutes, or hours.</td>
      <td>`10s`</td>
    </tr>

    <tr>
      <td />

      <td>`has_errors`</td>
      <td>Whether the span has an error tied to its ID.</td>
      <td>`true`</td>
    </tr>

    <tr>
      <td />

      <td>`parent_span_id`</td>
      <td>Span ID of the span's parent.</td>
      <td>`327611203ec5b0a1`</td>
    </tr>

    <tr>
      <td />

      <td>`span_kind`</td>
      <td>Broad source of the span.</td>
      <td>`Browser`</td>
    </tr>

    <tr>
      <td />

      <td>`span_name`</td>
      <td>Title of the span.</td>
      <td>`POST https://app.launchdarkly.com`</td>
    </tr>

    <tr>
      <td />

      <td>`trace_id`</td>
      <td>Trace ID of the spans.</td>
      <td>`7654ff38c4631d5a51b26f7e637eea3c`</td>
    </tr>
  </tbody>
</table>
