How telemetry reaches Trefur
Trefur supports five ingest paths. All emit identical payloads to the same backend — pick the one that fits your runtime, or combine them.
The five paths
┌────────────────────────────────┐
│ Trefur │
│ observe.trefur.com / api.… │
└──────────────▲─────────────────┘
│ HTTPS, gzip, retry
┌──────────────────────────┼──────────────────────────┐
│ │ │
┌─────┴──────┐ ┌────────┴────────┐ ┌───────┴────────┐
│ SDK │ │ trefur │ │ OAuth-based │
│ direct │ │ collector │ │ platform │
│ │ │ (single bin) │ │ discovery │
└────────────┘ └─────────────────┘ └────────────────┘
▲ ▲ ▲
│ │ 8 inputs │ 16 platforms
│ │ │
in-process patch OTLP / LLM proxy / OAuth into Google
(Anthropic, OpenAI, MCP proxy / shell Workspace, M365,
LangChain, …) hook / exec wrap / OpenAI Admin, …
CDP proxy / HTTP
┌────────────┐ ┌────────────────┐
│ Webhook │ │ OTel │
│ ingest │ │ forwarder │
└────────────┘ └────────────────┘
▲ ▲
│ push from anywhere │ from your
│ │ existing OTel
│ │ pipeline
Two ingest hostnames, one backend. Language SDKs send to observe.trefur.com by default (override with the endpoint option or TREFUR_ENDPOINT). The collector and any raw OTLP forwarder send to the standard OTLP paths under api.trefur.com — /v1/traces, /v1/metrics, /v1/logs. Both terminate at the same backend and produce identical data, so the choice is only about how you emit, never about where the data lands. The console — where you view it all — is app.trefur.com.
1. SDK direct
Pick the SDK for your language, call init(), and every Anthropic / OpenAI / LangChain / CrewAI / Vercel AI / MCP call is instrumented automatically.
| Language | Package | Install |
|---|---|---|
| JS / TS | @trefur/observe | npm install @trefur/observe |
| Python | trefur-observe | pip install trefur-observe |
| Go | github.com/trefur-ai/trefur-sdks/go/observe-go | go get github.com/trefur-ai/trefur-sdks/go/observe-go |
| Rust | trefur-observe | cargo add trefur-observe |
| Java | ai.trefur:trefur-observe | Maven Central |
| .NET | Trefur.Observe | dotnet add package Trefur.Observe |
When to pick it: single-process app, in-process control of code, framework auto-instrumentation. Latency: zero added (asynchronous batch flush). Fidelity: highest — exact call args, full message arrays. Attribution: exact (the SDK runs inside your code, so identity is unambiguous).
Read more: JS, Python, Go, Rust, Java, .NET.
2. trefur collector (single binary, 8 inputs)
A single binary you run alongside your agent fleet. Eight ingest paths in one process:
| Input | Listens on | What it captures |
|---|---|---|
| OTLP HTTP | :4318 | POST /v1/traces, /v1/metrics, /v1/logs |
| OTLP gRPC | :4317 | Same three OTLP signals over gRPC, TLS-aware |
| SDK proxy | :9090 | Receives payloads from in-process SDK clients pointed at this collector |
| LLM proxy | :9091 | HTTPS reverse-proxy for OpenAI / Anthropic / Bedrock / Gemini / MiniMax; captures model, tokens, tool calls, finish-reason |
| MCP proxy | :9092 | Sits between an MCP client and one or more MCP servers; emits the manifest + per-tool-call spans |
| Shell hook | :8889 | zsh / bash / fish preexec hook receiver — every shell command is logged with redaction |
| HTTP proxy | :8890 | Forward HTTP proxy with optional MITM; emits one http_call per request |
| Exec wrapper | n/a | trefur run -- python agent.py wraps any child process and emits exec / stdout / stderr telemetry |
Plus a cloud-authored pipeline DSL: rules authored in the Trefur dashboard (drop / mask / extract / route / enrich) are pulled to the collector every 60s and applied before data leaves your network. The same rules re-apply cloud-side as defense in depth.
Install: brew install trefur-ai/tap/trefur-collector, or download the latest binary from GitHub Releases (Linux / macOS / Windows for amd64 + arm64), or pull the container at ghcr.io/trefur-ai/trefur-collector:latest, or use the one-liner curl install. Init wizard at trefur init.
When to pick it: multi-language fleet, telemetry from agents you do not own (third-party CLIs, MCP servers, headless browser automation), local-buffer-before-egress requirements, OS-level shell capture, or a data-sovereignty story (PII never crosses the prem boundary).
Read more: collector reference.
3. 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 — and you cannot add an SDK or collector to every endpoint. Pairs well with the SDK for the agents you own + OAuth discovery for the rest.
Read more: integrations index.
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 an SDK or collector inside it).
5. OTel forwarder
If you already emit OpenTelemetry to another backend, the cheapest path is to add Trefur as a second OTel exporter — no new SDK, no new agent. Point any OTLP/HTTP exporter at:
- Standard OTLP/HTTP (JSON):
https://api.trefur.com/v1/traces,https://api.trefur.com/v1/metrics,https://api.trefur.com/v1/logs. Stock OpenTelemetry exporters default to binary protobuf, so setOTEL_EXPORTER_OTLP_PROTOCOL=http/jsonto send JSON to these endpoints. - Running the collector locally? Point your exporter at its OTLP/HTTP receiver instead:
http://localhost:4318/v1/traces(and the/v1/metrics//v1/logssiblings).
Authenticate with Authorization: Bearer trf_obs_.... Or run a local trefur collector with both your existing exporter and Trefur as upstreams.
When to pick it: you already have an OTel pipeline and adding a second exporter is the path of least resistance.
Quick-decision matrix
| Situation | Pick |
|---|---|
| Single Node / Python / Go service you own | SDK direct |
| Multi-language fleet, k8s sidecar friendly | Collector |
| Unmanaged AI discovery: what is the rest of my company doing? | OAuth discovery |
| CLI session / dev-machine capture (incl. Claude Code) | Collector (shell hook + exec wrap) |
| You can't change the source but it can push | Webhook ingest |
| You have OTel already | OTel forwarder |