Skip to main content

Overview

Building LLM applications with modern frameworks is great—until you need to understand what’s actually happening under the hood. Traditional observability tools weren’t built for the nuances of LLM interactions: token counts, model parameters, prompt templates, tool calls, and multi-step agent workflows. That’s where OpenTelemetry (OTel) comes in. By integrating Freeplay with OTel, you get purpose-built LLM observability that works with any framework or orchestration approach. Whether you’re using Langgraph, building custom agents, or mixing frameworks, Freeplay captures what matters—automatically. Freeplay uses OpenTelemetry as a protocol to record LLM observability data. It’s not intended to provide general application telemetry for non-LLM related code, so sending arbitrary telemetry to Freeplay will not work. Freeplay supports traces that conform to the OpenInference semantic conventions.

Why OTel + Freeplay?

  • Framework flexibility: Your team uses Langgraph. Another team built custom agents. A third is evaluating Google ADK. With OTel, one integration supports all of them.
  • LLM-native insights: We automatically capture model parameters, token counts, tool schemas, and prompt templates—the data you actually need to improve your AI applications.
  • No architectural changes: Freeplay observes your orchestration logic without becoming part of it. Your code stays clean, your flexibility stays intact.
  • Built on standards: OpenInference semantic conventions mean your instrumentation is portable and future-proof.
Freeplay focuses on LLM observabilityWe only record traces and spans containing meaningful LLM information per OpenInference semantic conventions—not general application telemetry.Recommended approach:
  1. Use OpenInference instrumentation libraries when available (easiest option)
  2. Follow OpenInference semantic conventions for custom instrumentation
  3. For advanced control, use our OTel-compliant API directly
If your framework lacks an OpenInference library, you can still record data using standard OpenInference attributes like input.value, output.value, and gen_ai.request.model. See the supported attributes reference below.

Getting Started

Step 1: Install dependencies

Step 2: Configure the OTel exporter

Set up Freeplay as your OTel span processing endpoint:
Getting your credentials:

Step 3: Instrument your application

We recommend using OpenInference instrumentation libraries when available. For example, with Google ADK:
That’s it! Your LLM interactions are now being captured and sent to Freeplay. During development, print spans to your console for easier debugging:

Framework examples

Langgraph/Langchain

Langgraph/Langchain Integration

Complete end-to-end example integrating OTel with Langgraph

Custom instrumentation

If you’re building with a framework that doesn’t have an OpenInference instrumentation library, you can manually instrument your code following OpenInference conventions:
Your span must have a kind value of either SPAN_KIND_INTERNAL or SPAN_KIND_SERVER.Your spans must have an attribute named openinference.span.kind with a value of LLM, AGENT, CHAIN, or TOOL.Other spans will be ignored.Freeplay only records data data described below, not general application telemetry.

Key concepts

Span types

Freeplay processes different span types based on openinference.span.kind:
  • LLM: Direct LLM API calls with prompts, completions, and token usage
  • AGENT: Higher-level agentic workflows with decision-making
  • CHAIN: Sequential operations or pipelines
  • TOOL: External tool or function calls
Set the appropriate span kind to ensure Freeplay correctly interprets your traces.

Sessions and traces

Use session and trace identifiers to organize related interactions:
This enables you to track multi-turn conversations and group related agent runs in Freeplay’s observability UI.

Environment attribute

You should add environment attribute to your spans that corresponds with the prompt template environment that you are using. For example, if you are using a prompt template in the “production” environment, you should set the environment attribute to “production”.

Supported attributes reference

OpenInference attributes

Freeplay maps OpenInference attributes to internal fields for consistent observability. These are the standard attributes you should use when instrumenting your LLM applications:

Freeplay-specific attributes

Enhance your traces with Freeplay-specific metadata for tighter integration with Freeplay features:

Next steps

Once you’ve integrated OTel with Freeplay, you can:
  • View traces in the Freeplay observability dashboard
  • Run evaluations on your logged interactions to measure quality
  • Build datasets from production traces for systematic testing
  • Monitor performance across different model versions and configurations
  • Track costs with automatic token usage and cost calculations

Additional resources