OtisDocs

What Otis records

Spans

The unit of telemetry that Otis receives from your app, what a span holds, and what happens to it on the way in.

A span is one recorded operation in your app, such as an AI call, a tool call, a traced function or a custom event. Each span has a name, a start time, a duration, a status and a set of attributes. Otis stores every span it accepts, and builds everything else from them: tasks, sessions, signals and the numbers in an insight.

This page is a short reference for what a span holds and what Otis does to it before storing it. The SDK guides cover how your app produces spans.

Kinds of span

KindProduced bySpan name
AI callWrapping your AI clientStarts with ai., anthropic. or openai.
Tool callA tool your AI calls, or an instrumented MCP server or command-line toolai.tool.<name>, mcp.tool.<name> or cli.tool.<name>
Traced functiontraced()The name you give, or the function's own name
Custom eventsendEvent()The name you give. An event has no duration.
FeedbacksendFeedbackSignal()feedback.<name>
Reported exceptionsendException()otis_exception

Calls that describe a user or a group, such as identifyUser and setUserProperties, are not stored as spans. Otis stores what they declare as properties.

Span contents

  • Context. The user, session, chat, document and surface that the operation belongs to. Your app sets these, and the SDK carries them onto each span.
  • Messages. For an AI call, the user's message and the AI's response.
  • Tool input and output. For a tool call, what was passed in and what came back. Otis keeps these apart from messages and never reads them as conversation.
  • Model and usage. For an AI call, the model, the provider, the input and output tokens, and how quickly the response arrived.
  • Status and cause. Whether the operation succeeded, and the cause if it failed.
  • Attributes. Everything else your app attached, such as the properties of a custom event.

Ingest handling

  • User and session IDs are hashed. By default the SDK hashes them before they leave your app, and Otis hashes them again with a secret that belongs to your project. Otis stores the hashed values. Users, groups and accounts covers this in more detail.
  • Personal data is redacted. The SDK redacts text in your app, and Otis redacts again when it receives the span. Both are on by default. Privacy describes what is scanned.
  • Long values are cut. A single attribute value is cut at 64 KiB.
  • Spans with an implausible time are rejected. Otis rejects a span that started more than 48 hours in the past or more than one hour in the future.
  • Only production spans are analyzed. Spans sent with a development API key, or from an environment your project has excluded, are kept for 24 hours and are left out of all analysis.

Otis keeps every production span it accepts. It doesn't sample them.

Retention

Otis keeps a production span for 90 days. The records it builds from spans last for different periods: tasks are kept for 90 days, and session summaries are kept for 365 days.

Spans in Otis

The data browser has a list of spans that shows each span's type, status, error cause, model, surface and signals. You can filter the list, for example by surface, error cause or signal. Opening a span shows its details, with a separate tab for its attributes.

  • Tracing covers AI calls, traced functions and how context is carried onto each span.
  • Custom events covers recording actions that involve no AI call.
  • Privacy covers hashing and redaction in detail.
  • Tasks covers how Otis groups the spans in a session into units of work.

On this page