Docs

Connect

OpenTelemetry and direct ingest

Send IA4AI a copy of your agents' usage while they keep calling the provider directly. Nothing sits in the live path.

Observe-only means your agents call the provider exactly as they do today and send IA4AI a copy of their usage. If IA4AI is unreachable, nothing about your agents changes: only the report is late. You get totals and counts per workspace and agent; for the exact cost of every call, use the gateway.

#Agents that already export OpenTelemetry

If your agent emits OpenTelemetry GenAI spans (OpenLLMetry, OpenInference, or the OTel GenAI conventions), point the exporter at IA4AI. These are the standard OpenTelemetry variables, so nothing here is specific to IA4AI:

.env
OTEL_EXPORTER_OTLP_ENDPOINT=https://ai.odux.io/app
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_METRICS_EXPORTER=otlp
OTEL_LOGS_EXPORTER=otlp
OTEL_TRACES_EXPORTER=otlp
OTEL_EXPORTER_OTLP_HEADERS="X-API-Key=YOUR_IA_KEY"
OTEL_SERVICE_NAME=my-agent

OTEL_SERVICE_NAME is the name the agent gets in your dashboard.

  • OTEL_EXPORTER_OTLP_ENDPOINT is a base: exporters add /v1/traces, /v1/metrics and /v1/logs to it. IA4AI serves those paths. To set one path yourself, use OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (or the metrics and logs variants), which the exporter uses as given.
  • Both OTLP/HTTP encodings are accepted, Protobuf (http/protobuf, the SDK default) and JSON (http/json), told apart by the Content-Type.
  • The exporters must be set: without them nothing is sent, and the protocol has no default.

IA4AI reads the gen_ai.* attributes (operation, provider, model, input and output tokens, tool names) and prices each call from its model catalog.

#Instrument a provider SDK with OpenInference

For an app that calls a provider SDK directly, wrap the client you already use with the matching OpenInference instrumentor; the variables above do the rest.

Provider Install Instrumentor
Anthropic pip install openinference-instrumentation-anthropic AnthropicInstrumentor
OpenAI pip install openinference-instrumentation-openai OpenAIInstrumentor
Google GenAI pip install openinference-instrumentation-google-genai GoogleGenAIInstrumentor
python
from openinference.instrumentation.anthropic import AnthropicInstrumentor

AnthropicInstrumentor().instrument()   # spans flow to the OTLP endpoint configured above

#Send a whole run as JSON

For an agent that makes decisions, you can send one complete run: its model calls, tool calls and the job it was doing. IA4AI builds a case from it, comparing what the agent said it did with what it actually did. No package is needed: it is one request to POST /ingest/trace.

Terminal
curl -s -X POST https://ai.odux.io/app/ingest/trace \
  -H "x-api-key: YOUR_IA_KEY" -H 'content-type: application/json' -d @run.json
run.json
{
  "job": {
    "job_id": "job_42",
    "description": "Diagnose the failing deploy",
    "agent_system": "support-bot"
  },
  "trace": {
    "trace_id": "9bce88f54776453e",
    "agent_system": "support-bot",
    "spans": [
      { "span_id": "s1", "operation": "invoke_agent", "name": "agent" },
      { "span_id": "s2", "parent_id": "s1", "operation": "chat",
        "provider": "openai", "model": "gpt-4o",
        "input_tokens": 1200, "output_tokens": 300, "latency_ms": 940 },
      { "span_id": "s3", "parent_id": "s1", "operation": "execute_tool",
        "tool_name": "get_pipeline_logs", "args": {"pipeline": "deploy"},
        "result": "OOM during build", "status": "success" }
    ]
  }
}

A span's operation decides what it is: chat, generate, execute_tool, invoke_agent, retrieval, guardrail, human or system. Everything else is optional. A span can carry its own start_time and end_time (ISO 8601, or seconds since 1970): a run sent in later then keeps the date its calls happened, and each call is priced at the rate of that time. Without them, the time the run arrives is used. A run with a job and no spans is refused (there is nothing to record). Without a job, the trace is stored and no case is built. Tool arguments and results are redacted on arrival, before anything is stored, and the reply gives the new case id.