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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# List metric tag values for a metric

> Lists values observed for one tag on one metric.

`axiom.listMetricTagValuesForMetric` lists values observed for one tag on one metric. Use the result to build a valid exact filter without mixing values observed only on other metrics.

```ts automations/axiom-list-metric-tag-values-for-metric.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("List metric tag values for a metric", () => {
  onHttpRequest({ scope: "automation" })
  axiom.listMetricTagValuesForMetric({
    datasetName: "metrics",
    metric: "http.server.duration",
    tag: "service.name",
  })
})
```

## Inputs

| Input         | Required | Default                                 | Description                                            |
| ------------- | -------- | --------------------------------------- | ------------------------------------------------------ |
| `datasetName` | Yes      | —                                       | OpenTelemetry metrics dataset name or ID.              |
| `metric`      | Yes      | —                                       | Non-empty metric name.                                 |
| `tag`         | Yes      | —                                       | Non-empty tag name.                                    |
| `startTime`   | No       | 30 minutes before execution             | Discovery-window start as an RFC3339 timestamp.        |
| `endTime`     | No       | Execution time                          | Discovery-window end as an RFC3339 timestamp.          |
| `edgeUrl`     | No       | `"https://us-east-1.aws.edge.axiom.co"` | Axiom query edge or an HTTPS `*.edge.axiom.co` origin. |

Set `edgeUrl` to the edge that stores the dataset.

## Output

Returns values observed for the tag on the metric in the selected window as `string[]`. No observed values returns `[]`.

## Permission and failures

The API token needs the dataset-level `query|read` capability for `datasetName`. Axiom returns an error when the dataset, metric, or tag is missing or inaccessible, and rejects invalid time windows. Request-rate limits return `429`, while exhausted query-cost limits return `430`. Automate.ax uses Axiom's reset timing when available.
