> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Grafana: List Trace Tags

Lists trace attribute (tag) names, or the values for a specific tag, from a Grafana Tempo datasource.


> **Availability:** See the [Incident Workflow Actions Overview table](/workflow-actions) for the plans this workflow is available on.

## Description

List trace attribute (tag) names, or the values for a specific tag, from a Grafana Tempo datasource. Use this action to discover which attributes exist, and which values they take, before filtering traces with TraceQL.

## Instructions

1. If you have not done so, follow the instructions to [Create an Incident Workflow](/ai-automation/automation/incident-workflows#create-an-incident-workflow).
2. When the instructions prompt you to [add actions](/ai-automation/automation/incident-workflows#add-actions), select **this action**.
3. Enter the following **Inputs** and click **Save**.
4. Continue following instructions to **Publish** the Workflow.
5. When the action runs, you will see the **Outputs** listed below.

## Inputs

> **Field References:** Fields with the **\{+\}** icon accept [Field References](/ai-automation/automation/incident-workflows#field-references), which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click **\{+\}**, or enter `{{`, and select relevant fields. Refer to the [Field References](/ai-automation/automation/incident-workflows#field-references) article for more information.

| Name                              | Description                                                                                                                                                         |
| :-------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Connection Input**              | The Grafana Connection to use.                                                                                                                                      |
| **Datasource**                    | The Tempo datasource UID to discover tags from.                                                                                                                     |
| **Tag Name**<br />_(Optional)_    | If set, lists the values of this tag, using its scope-qualified name (for example `resource.service.name`). If empty, lists tag names.                            |
| **Scope**<br />_(Optional)_       | Restricts the tag names listed to one attribute scope: `All`, `resource`, `span`, `intrinsic`, `event`, `link`, or `instrumentation`. Defaults to `All`. Ignored when **Tag Name** is set. |
| **Query**<br />_(Optional)_       | A TraceQL filter to scope results, for example `{ resource.service.name = "checkout" }`.                                                                            |
| **Time Window**<br />_(Optional)_ | Lookback window. Tags and values are scoped to traces ingested within it. One of `5m`, `15m`, `30m`, `1h`, `6h`, `12h`, `1d`, or `7d`. Defaults to `1h (Past 1 Hour)`. |
| **Limit**<br />_(Optional)_       | Maximum number of tag names or values to return, from 1 to 5000. Defaults to 1000.                                                                                  |

## Outputs

| Name               | Description                                                                         |
| :----------------- | :---------------------------------------------------------------------------------- |
| **Tag Names**      | Array of scope-qualified tag names. Populated when **Tag Name** is empty.           |
| **Tag Values**     | Array of values for the requested **Tag Name**. Empty when listing tag names.       |
| **Count**          | Number of tag names or tag values returned.                                         |
| **Mode**           | `tag_names` or `tag_values`.                                                        |
| **Truncated**      | Whether more items existed than the **Limit**.                                      |
| **Result**         | Value that shows if the action was successful or not. Either `Success` or `Failed`. |
| **Result Summary** | Brief description of what the action did or if it failed.                           |
| **Error**          | Brief description that is populated if the action failed.                           |

> **Tag names:** Tag names are scope-qualified, for example `resource.service.name` or `span.http.method`. Intrinsics such as `duration` and `status` are returned without a scope prefix.

<br />
