Observability is the ability to understand the internal state of a system. Opper provides the means of creating very detailed relational logs through tracing. This is useful to be able to debug multi step AI sequences common in AI features such as chat systems, assistants and agents.

What is a trace?

A trace is a collection of spans that are related to a execution of some functionality. For example, a trace could capture the execution of an invocation of an agent.

What is a span?

A span is a single unit of work within a trace. It records important information from each step of the execution. A trace is built up of a hierarchy of spans where each span can have child spans. The first span of an execution is called the root span. Spans are connected by passing the parent span id when creating a new span.

Common operations

  • Create a span to start a trace
  • Create a span within a span to create hierarchy.
  • Get a trace to retrieve a full chain of spans.
  • Attach a metric to attach evals to a span.
  • Save to dataset to save span input and output to a dataset as examples.