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

# Metadata: customer, agent, flow

> Glassray's metadata convention — three fields that make every trace filterable, set as defaults at construction and overridden per trace.

Glassray's metadata convention is three fields. They land on every trace as filterable tags, so you can slice flows, deviations, and searches by who a run was for and what it did:

| Field      | What it identifies                                   | Typical cardinality   |
| ---------- | ---------------------------------------------------- | --------------------- |
| `customer` | Whose run this was — your customer/tenant identifier | Varies per run        |
| `agent`    | Which agent produced it, if you run more than one    | Fixed per process     |
| `flow`     | A hint for which [flow](/flows) the run belongs to   | Varies per entrypoint |

<Info>
  This is **one standard with two ways in**: traces pushed by the SDK and traces pulled from Langfuse, LangSmith, or PostHog carry the same three tags, so dashboards and filters work identically regardless of how a trace arrived.
</Info>

<Note>
  **Which project a trace lands in is decided by the ingest key**, not by any attribute you set — a trace lands in the project of the source (ingest key) that ingested it. The old `environment` field no longer routes traces and is ignored; use a separate source per project (prod, staging, …). See [Projects](/projects).
</Note>

## Defaults at construction, overrides per trace

Set the values that are fixed for the process on the constructor; override the ones that vary per run in the trace's `meta`. A per-trace value always wins over the constructor default.

```ts theme={null}
const glassray = new Glassray({
  agent: "support-agent",
});

await glassray.trace(
  "handle-ticket",
  { customer: "acme-corp", flow: "refunds" },
  async (t) => { ... },
);
```

In practice: `agent` is a constructor default, `customer` is per-trace (it varies with each run), and `flow` is optional either way.

## What it becomes in Glassray

Each field lands as a trace tag (`customer:acme-corp`, `agent:support-agent`, …) at ingest — the same filterable index the rest of the dashboard uses. `flow` is a hint: Glassray's own [flow classification](/flows) remains the authority for grouping traces.

<Note>
  On the wire these are the `glassray.*` resource attributes (with a root-span override), which matters only if you [bring your own OTel](/sdk-byo-otel) — the SDK sets them for you.
</Note>
