---
title: "Per-collector attribution"
description: "Every record carries the ID of the collector that sent it, so you always know where data came from."
source: "https://getloggerhead.com/docs/collectors/per-collector-attribution/"
---

# Per-collector attribution

> Every record carries the ID of the collector that sent it, so you always know where data came from.

The root stamps nothing itself. A branch stamps `loggerhead.collector.id` on every record before it forwards. The root reads that key and files the record under that collector.

## What the root does with the ID

- **First sight registers the branch.** When a record with an unknown ID arrives, the root adds the ID to its collector list. No register call is needed.
- **Every record is a heartbeat.** A branch reads **online** while records arrive. A branch with no record for 90 seconds reads **offline**.
- **The Collectors page shows each branch** with its throughput, its last-seen time, and its error count.
- **The collector map** draws each branch as a node and each service that sent through it as an edge, with the count of logs, spans, and errors on the edge.

## Stamp the ID on a branch

Use the `resource` processor in the branch config:

```yaml
processors:
  resource:
    attributes:
      - key: loggerhead.collector.id
        value: docker-branch-1
        action: upsert
```

An app that sends straight to the root with no branch carries no ID. The root files it under the built-in local collector, `local`.

## Pull sources

A pull source belongs to the built-in local collector. Every record from a pull source carries `loggerhead.pull.source` with the source name. Use it to isolate one source in a query.

## Give a branch a display name

Open the branch on the **Collectors** page and click **Rename**. The name survives a restart; a later sighting keeps it and only refreshes the heartbeat.

## Read one collector's data

Add the collector to a query filter on the Logs, Traces, or Metrics page. Your AI coding tool reads the same field through the [MCP tools](/docs/mcp-server/tools-reference/).
