Integrations
Integration

Monitor oh-my-pi with Sazabi

By Sazabi Team

Last verified on Nov 8, 2026.

oh-my-pi (omp) is a terminal coding agent. Its work happens in a loop: ask the model, run a tool, ask the model again. The cost and the failures sit inside that loop, where a commit history cannot show them.

omp can export the loop as OpenTelemetry spans. Sazabi, the AI-native observability and security platform, takes those spans as a manual log source. This page covers what the spans hold and what you can ask of them.

What Sazabi reads from oh-my-pi

There is one method, and the data flows one way. omp's built-in exporter sends OTLP traces to your Sazabi intake URL, and Sazabi does not reach back into omp.

According to the Sazabi docs for this source, each session produces spans for model API requests, plus agent-invocation and tool-call spans. Attributes include gen_ai.request.model, gen_ai.provider.name, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens and gen_ai.conversation.id. The spans also carry an estimated cost. Prompt, response and tool payloads are left out unless you opt in.

The oh-my-pi repository documents the shape. Its telemetry module follows the OpenTelemetry GenAI semantic conventions and emits three span kinds. invoke_agent covers one run of the agent loop. Under it, a chat span is one model call and an execute_tool span is one tool call. That nesting is what lets you tie a cost to the tool call that caused it.

omp's environment-variable documentation adds three limits. Export starts only when at least one signal has an endpoint. Only http/protobuf is enabled. And OTEL_* values placed in omp's own .env files are held privately for its exporter, so programs omp launches do not inherit them. A telemetry.otlpExportEnabled setting or OTEL_SDK_DISABLED=true turns export off.

Sazabi ingests traces only for this source. Leave the logs and metrics exporters at none. omp does not stamp identity on spans, so add user.email through OTEL_RESOURCE_ATTRIBUTES if you want to attribute sessions to people.

Questions it answers

  • Which model and provider took the most output tokens last week?
  • How many tokens did a single session use, from first call to last?
  • Which tools does the agent call most, and how long do those spans last?
  • Did a change of provider alter token use for the same kind of work?
  • Which developers run omp, and from which sessions?
  • Do spans arrive under the service name you expect?

A worked example: one expensive session

Say a teammate reports that a refactor "ate the budget". You have the session's gen_ai.conversation.id from the terminal. The spans for it hold records like this one. The values are invented and the names come from the Sazabi page.

{
  "gen_ai.conversation.id": "c-5e02a",
  "gen_ai.provider.name": "anthropic",
  "gen_ai.request.model": "claude-sonnet-5",
  "gen_ai.usage.input_tokens": 61200,
  "gen_ai.usage.output_tokens": 9800,
  "service.name": "oh-my-pi",
  "user.email": "dev@example.com"
}

Ask from the CLI:

sazabi logs ask "total gen_ai.usage.output_tokens per gen_ai.conversation.id for service oh-my-pi since yesterday, top 10"

The top row tells you which session to open. Search its gen_ai.conversation.id and read the spans in order. Many chat spans with large gen_ai.usage.input_tokens and few tool spans between them suggest a long context being resent on every call. A long run of execute_tool spans suggests the agent was stuck in a tool loop. The first case is a prompt or context problem. The second is a task or tool problem. Different fix, and the spans tell you which one you have.

What stays out of the data

By default the spans hold no message text. If you set OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT to summary or full, prompts, responses and tool content ride along on every span. The Sazabi docs warn about this, so decide it per team, not per laptop.

How it fits with other integrations

omp is one of several coding agents Sazabi reads. Claude Code and Codex send events instead of spans. See the coding agents category for the full set. Since omp speaks OTLP, the OpenTelemetry integration covers the transport, and pricing explains how ingested volume counts.

Log sources

  • oh-my-pi (manual log source, coding agents): Export the standard OTEL environment variables for oh-my-pi (omp) to ship coding-agent session spans — model, provider, token usage, and cost, with no prompt text — to Sazabi.

Frequently Asked Questions

Does Sazabi receive my prompts from oh-my-pi?

Not by default. omp exports model, provider, token usage and estimated cost without prompt text. Setting OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT to summary or full attaches prompt, response and tool content to every span, so leave it unset unless your team accepts that.

Why do I need OTEL environment variables instead of an omp setting?

omp reads the standard OpenTelemetry variables and has no telemetry keys of its own for the endpoint. Export them in the shell or launcher that starts omp, then start a new session.

Does Sazabi store omp metrics or logs?

No. Only the OTLP traces exporter is supported for this source. The Sazabi docs say to keep the logs and metrics exporters at none.

How do I tell whose session a span came from?

omp does not stamp identity on spans. Export OTEL_RESOURCE_ATTRIBUTES with a user.email value, and spans carry it. A gen_ai.conversation.id value groups the spans of one session.

Sources

  1. oh-my-pi connects to Sazabi as a manual log source (accessed Nov 8, 2026)
  2. Span attributes, standard OTEL variables, the bare endpoint URL, traces-only ingestion, user.email through OTEL_RESOURCE_ATTRIBUTES and the content-capture warning (accessed Nov 8, 2026)
  3. omp starts OTLP export only when a signal has an endpoint, telemetry.otlpExportEnabled and OTEL_SDK_DISABLED turn it off, only http/protobuf is enabled, and OTEL_* values in omp .env files are kept private to its exporter (accessed Nov 8, 2026)
  4. Span hierarchy of invoke_agent, chat and execute_tool, the GenAI semantic conventions, opt-in content capture through OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT (accessed Nov 8, 2026)