traceAI OpenTelemetry Python: trace an LLM application

traceAI OpenTelemetry Python: Apache 2.0 SDK, instrument an LLM call, pick an OTLP backend and mask prompts and responses.
traceAI OpenTelemetry Python : tracer une application LLM

Your application talks to a language model, yet your traces say nothing about what happened inside the call. With traceAI OpenTelemetry Python, each model call becomes a span you can read in any tracing tool. The future-agi/traceAI repository is licensed under Apache 2.0 and showed 266 stars on 14 November 2026, with commits dated 12 November.

This article starts from an operations decision: where do these spans go, and what are you willing to leave in them? The facts come from the repository README and LICENSE file, read on 14 November 2026.

A word of honesty: span.observer did not run these commands. The snippets follow the README, and the three images below are renderings of that content. To place traceAI among its neighbours, read OpenLIT and OpenTelemetry, Langfuse and OpenLLMetry and OpenInference to a Collector first.

traceAI OpenTelemetry Python: what the repository offers

The project describes itself as an open source tracing framework for AI applications, built on OpenTelemetry. It is published by Future AGI, and its LICENSE file reads “Copyright 2024-2026 Future AGI, Inc.” The repository holds 1,723 commits on its main branch, but its page lists no published release.

  • Integrations: the README claims 80 families: model providers, agent frameworks, vector databases, gateways such as LiteLLM, voice and coding agents.
  • Languages: Python, TypeScript, Java, Go and C#. The C# package only offers manual spans, with no automatic instrumentation.
  • Input data: the README adds that the project also accepts OpenInference and OpenLLMetry data.

One limit to keep in mind: the README does not claim to follow a specific revision of the OpenTelemetry GenAI conventions. It names attributes such as gen_ai.request.model and gen_ai.usage.input_tokens, but also its own, such as input.value. Coverage varies by integration.

Install and instrument in Python

In Python, two packages are enough for OpenAI. Each provider or framework has its own traceai-* package, and that package installs the instrumentation.

  1. Install the packages: pip install fi-instrumentation-otel traceai-openai.
  2. Call register() to create a tracer provider named after the project.
  3. Hand that provider to the instrumentor: OpenAIInstrumentor().instrument(tracer_provider=provider).
  4. Call provider.shutdown() before the program exits, so pending spans are flushed.
Python file based on the traceAI README: register(), OpenAIInstrumentor().instrument() and provider.shutdown()
Source : github.com

By default, register() sends traces to the Future AGI platform. That requires the FI_API_KEY and FI_SECRET_KEY variables. For another backend, see the next section: this is where the operations decision is made.

Keeping traces at home: an existing OpenTelemetry provider

The README says the Python and TypeScript instrumentors accept a tracer provider that is already configured. With your own provider and exporter, you set the destination and the authentication yourself. The README also states that the SDK uses OpenTelemetry span processing and OTLP exporters.

The example below is our own illustration, not a README excerpt: it sends spans to a local Collector over OTLP/HTTP. It relies only on the standard OpenTelemetry SDK API.

Python example: an OpenTelemetry TracerProvider with an OTLP/HTTP exporter, passed to OpenAIInstrumentor
Source : github.com

That way, instrumentation stays traceAI’s, but the data path becomes yours. You can put a Collector in front, filter attributes, then pick the backend. For Dynatrace, we have not verified this connection: rely on docs.dynatrace.com only, and tell SaaS and Managed apart.

Deciding what traces may contain

The README is blunt: prompts and responses are captured by default. For personal or confidential data, that is a real risk. Traces often live longer and are readable by more people than application logs.

The project documents environment variables for Python and TypeScript: FI_HIDE_INPUTS, FI_HIDE_OUTPUTS, variants for messages, text or images, FI_HIDE_EMBEDDING_VECTORS and FI_HIDE_ERROR_DETAILS.

Terminal: pip install of the traceAI packages, then FI_HIDE_INPUTS, FI_HIDE_OUTPUTS, FI_HIDE_EMBEDDING_VECTORS and FI_HIDE_ERROR_DETAILS set to true
Source : github.com

Be careful: the README warns that masking does not guarantee that user metadata or manually added attributes are free of sensitive data. So review what your own code adds to spans.

How to check that it works

Make a single model call, then look for the span in your backend. It should carry at least the model name and the token counts. If nothing arrives, check three things: the provider was passed to the instrumentor, the program calls shutdown(), and the Collector listens on the expected port (4318 for OTLP/HTTP).

If the span arrives without the prompt text, your FI_HIDE_* variables are active. That is the intended behaviour in production. To follow token cost afterwards, see the cost of an AI agent measured with OpenTelemetry.

Limits and open questions

  • The repository is young next to similar projects, and no release shows on its page: pin your package versions.
  • Compliance with the GenAI conventions is not guaranteed: test your queries against the real attributes.
  • We have not measured the instrumentation overhead. Do it on your own workload.
  • The README examples send data to Future AGI: decide knowingly whether that is acceptable.

Best practices

  • Turn on the FI_HIDE_* variables before the first deployment, not after an incident.
  • Go through a Collector to keep control of attributes and destination.
  • Name the project after the service and the environment.
  • Pin the traceai-* package versions and read their release notes.

Frequently asked questions

Does traceAI force the Future AGI platform on you?

No, according to the README: the instrumentors accept an existing OpenTelemetry provider, so another OTLP backend works. The default examples do target Future AGI, though.

What licence does traceAI use?

The repository LICENSE file is the Apache License 2.0, with the line “Copyright 2024-2026 Future AGI, Inc.”

Are prompts recorded in traces?

Yes by default, per the README. The FI_HIDE_INPUTS and FI_HIDE_OUTPUTS variables switch that capture off.

Conclusion

traceAI is worth a trial if you want spans for dozens of providers and frameworks without writing them yourself. Decide first where the data goes and what it contains, then switch instrumentation on. Repository: future-agi/traceAI.

span.observer is an independent community blog, not affiliated with Dynatrace LLC or Future AGI. Brands mentioned belong to their owners. Tools change quickly: check commands and options in the official documentation.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
Falco sécurité runtime : relier les alertes aux logs et aux traces

Falco runtime security: linking alerts to logs and traces

Next Post
Faille React2Shell (CVE-2025-55182) : repérer et corriger la RCE de React Server Components

React2Shell vulnerability (CVE-2025-55182): find and fix the React Server Components RCE

Related Posts