How it works
When spans arrive atPOST /api/traces/spans, LangSight inspects each span’s agent_name and server_name fields. Any value not already in the catalog is automatically registered:
Zero-config setup
There is nothing to configure. Auto-discovery is always on. As soon as you send your first span, the Agents page and Servers page in the dashboard populate automatically.Batch backfill
Already have trace data in ClickHouse but the catalog is empty? Use the batch discover endpoints to scan all historical spans and register everything at once.Discover agents
Discover servers
Both
/discover endpoints require admin role. They scan ClickHouse for all distinct agent_name and server_name values and register any that are missing from the catalog.What gets registered
| Catalog | Field scanned | Initial description | Status |
|---|---|---|---|
| Agents | span.agent_name | ”Auto-discovered from traces” | active |
| Servers | span.server_name | ”Auto-discovered from traces” | — |
In-process deduplication
The span ingestion endpoint maintains an in-memory set of already-seen agent and server names. A name is only registered once per API process lifetime, avoiding redundant database writes on every span.When to use manual registration instead
Auto-discovery is sufficient for most setups. Use manual registration (PUT /api/agents/metadata/{name}) when you need:
- Custom descriptions or runbook URLs before the first span arrives
- Tags for filtering (e.g.,
["production", "critical"]) - Pre-populating the catalog for a new project before agents are deployed