ProxonProxon
Open Proxon
Documentation

OTel for Agents

Send model usage and cost to Proxon from the agents and services you build, in any language, with OpenTelemetry.

If an agent or service you built already emits OpenTelemetry, Proxon can read its model usage and cost directly, in any language. That includes server-side AI that never runs on anyone's device, such as a backend service, a CI job, or a scheduled agent. There is no new agent, no proxy, and no certificate. You mint a credential and set a few standard OTLP environment variables.

Proxon reads only the structured usage it needs to attribute cost, which is the model and the token counts. You decide what the rest of your telemetry sends.

To have an AI tool like Claude Code or Codex report its own usage, see OTel for AI Tools instead. That path uses a personal credential and a guided setup, and credits the usage to you.

This takes about five minutes. You mint a credential, point your existing OpenTelemetry exporter at Proxon, and confirm the usage lands.

Step 1: Mint an organization credential

Open Org Settings, then Credentials, and choose Generate. Proxon issues a bearer token that starts with prx_svc_, scoped to your organization. Only organization owners and admins see Credentials, so ask an admin if you do not.

An organization credential carries no person. Usage sent with one belongs to the organization and never appears under anybody's name. That is right for a shared service, a CI job, or a server-side agent.

The token is shown once. Copy it and store it as a secret, such as an environment variable or an entry in your secrets manager. Proxon keeps only a hash, so it cannot show the token to you again. If you lose it, rotate it or generate a new one. You can revoke or rotate a credential from the same screen at any time.

Step 2: Point your OTLP exporter at Proxon

Set the standard OpenTelemetry environment variables below. Any OTLP/HTTP exporter reads them on its own, and there is nothing Proxon-specific to import. Proxon accepts stock OpenTelemetry spans in either JSON or protobuf encoding over HTTP. It does not accept OTLP over gRPC.

Give the exporter the base URL rather than a signal path. Exporters add /v1/traces or /v1/logs themselves, and one base URL covers both.

Any OTLP exporter
# Point your OTLP/HTTP exporter at Proxon.
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.proxon.ai"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"

# Authenticate with the credential you minted in Step 1.
# The value is percent-encoded per the OTLP spec, so Bearer%20<token> means Bearer <token>.
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer%20prx_svc_<prefix>_<secret>"

# Optional. Name the agent this telemetry belongs to, since the rollup keys on it.
# This sets the standard service.name resource attribute that Proxon reads.
export OTEL_SERVICE_NAME="my-agent"

Swap the placeholder for the token from Step 1. The next batch your exporter flushes will land in Proxon.

Step 3: Confirm it landed

Open Cost Intelligence and choose the By agent tab in the spend explorer. Your agent's spend appears there under the agent name you set, broken down by model, usually within a minute of the first flush. There is nothing to turn on first.

What Proxon reads from your spans

Proxon turns each span into one usage row, using the standard OpenTelemetry GenAI attributes. Anything a normal GenAI instrumentation already sets is enough.

Attributes Proxon reads
gen_ai.provider.name       # e.g. "anthropic" or "openai"
gen_ai.request.model       # e.g. "claude-opus-4-8" or "gpt-4o"
gen_ai.usage.input_tokens  # integer
gen_ai.usage.output_tokens # integer
gen_ai.operation.name      # e.g. "chat"
proxon.agent               # optional, a per-span agent name that overrides OTEL_SERVICE_NAME

Proxon reads only the usage attributes it needs to attribute cost. Everything else your spans carry is set by your own instrumentation. If you do not want prompt or response text leaving your environment, keep it out of the telemetry you export.

SDK or OpenTelemetry?

The Proxon SDK for Agents and OpenTelemetry do the same job in two ways. For a Node app you control, the Proxon SDK for Agents auto-instruments it with one line. For an agent in another language, or one that already emits OpenTelemetry, use this OTLP path. Either one is enough on its own, and running both adds detail rather than new coverage. See the data collection overview for the full picture.