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

# Tags

> Add lightweight labels to traces so you can filter and search cohorts.

# Tags

Tags are lightweight trace labels for broad, repeated categories such as environment, agent name, feature area, rollout, or customer segment.

## Send tags

Pass tags through `capture()`.

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
    import { capture } from "@latitude-data/telemetry"

    await capture(
      "support-agent-turn",
      async () => {
        return agent.run(userMessage)
      },
      {
        tags: ["production", "support-agent", "checkout"],
      },
    )
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    from latitude_telemetry import capture

    capture(
        "support-agent-turn",
        lambda: agent.run(user_message),
        {
            "tags": ["production", "support-agent", "checkout"],
        },
    )
    ```
  </Tab>
</Tabs>

Nested captures inherit parent tags. Additional tags are appended and deduplicated.

## Use tags in Latitude

Tags appear in trace metadata.

<Frame>
  <img src="https://mintcdn.com/latitude-monitoring/_4Tkv8qI7n9-0AGB/images/observability/tags.png?fit=max&auto=format&n=_4Tkv8qI7n9-0AGB&q=85&s=92594c6b58ca7306a3a94d6da050aa1e" alt="Traces table showing colored tags such as production, support, development, and internal-kb" width="1710" height="774" data-path="images/observability/tags.png" />
</Frame>

Use tags to:

* filter the Traces page
* narrow semantic or exact-text searches
* save reusable search cohorts
* scope evaluation monitoring
* compare issue patterns across environments, agents, or features

## Tags vs metadata

Use tags for labels you commonly filter by, such as environments or rollout cohorts. Use [metadata](./metadata) for structured key-value context such as request ids, plan names, regions, experiment ids, or account properties.

## Related

* [Metadata](./metadata): Attach structured context
* [Filters](../filters): Filter traces by tags
* [Search](../../search/overview): Combine tags with semantic search
