Skip to content
Download

Per-collector attribution

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.

  • 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.

Use the resource processor in the branch config:

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.

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.

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.

Add the collector to a query filter on the Logs, Traces, or Metrics page. Through the API, add collectorId=<id> to the query string. See HTTP API.