How telemetry reaches Trefur
Four ways in, none of which installs anything from Trefur. All land in the same workspace — pick the one that fits your runtime, or combine them.
1. OAuth-based platform discovery
Connect Trefur to platforms your team already uses. We pull activity via official admin APIs — no code change needed by the agents themselves.
- Google Workspace — Reports API (Gemini in Workspace apps), OAuth-grants scanner, Vertex AI Cloud Audit Logs filter for
aiplatform.googleapis.com+ Cloud Assistcloudaicompanion.googleapis.com - Microsoft 365 — Microsoft Graph audit logs, Copilot prompt counts
- OpenAI Admin API — org + per-user usage
- Anthropic Admin API — workspace + per-key usage
- Slack / Atlassian / Zendesk / HubSpot / Intercom / Salesforce — bot + integration activity
- GCP / AWS / Azure — cloud-native AI service usage
- Snowflake / Databricks — warehouse-resident agent + model usage
When to pick it: you want to see every AI agent in your org — including ones built outside your engineering team — with no change to the agents themselves. Pairs well with OpenTelemetry traces from the agents you own.
Read more: integrations index.
2. OpenTelemetry traces (OTLP/HTTP)
Any OpenTelemetry SDK or collector can send traces to https://api.trefur.com/v1/traces, as protobuf or JSON. Stock exporters work as is, with either http/protobuf or http/json. Authenticate with a telemetry key from the app (Add agent, then Advanced: use a telemetry key):
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.trefur.com/v1/traces
export OTEL_EXPORTER_OTLP_TRACES_HEADERS="Authorization=Bearer%20trf_obs_..."When to pick it: you own the agent code, or you already emit OpenTelemetry and adding a second exporter is the path of least resistance. Spans that follow the OpenTelemetry GenAI semantic conventions need no mapping.
Read more: quickstart, API reference.
3. Claude Code telemetry
Claude Code exports its own usage metrics and API request events over OpenTelemetry. Set a few environment variables and every session's token use, cost and model calls reach Trefur.
Read more: Claude Code.
4. Webhook ingest
Some systems already push events out — webhook delivery from a third- party agent platform, a workflow engine, a custom system. Configure a webhook in the Trefur dashboard, copy the signed URL, and point the sender at it. Trefur validates the HMAC signature, normalises the payload into a step, and ships it through the same pipeline as everything else.
When to pick it: the source pushes (it does not pull, and you cannot run your own code inside it).
Quick-decision matrix
| Situation | Pick |
|---|---|
| Unmanaged AI discovery: what is the rest of my company doing? | OAuth discovery |
| An agent you own, or an existing OTel pipeline | OpenTelemetry traces |
| Developers using Claude Code | Claude Code telemetry |
| You can't change the source but it can push | Webhook ingest |