Skip to main content

Traceloop -> GenAI translator emitter for OpenTelemetry GenAI

Project description

This package automatically translates Traceloop-instrumented spans into OpenTelemetry GenAI semantic conventions. It intercepts spans with traceloop.* attributes and creates corresponding spans with gen_ai.* attributes, enabling seamless integration between Traceloop instrumentation and GenAI observability tools.

Mapping Table

Traceloop Key

Added Key

traceloop.workflow.name

gen_ai.workflow.name

traceloop.entity.name

gen_ai.agent.name

traceloop.entity.path

gen_ai.workflow.path

traceloop.correlation.id

gen_ai.conversation.id

traceloop.entity.input

gen_ai.input.messages

traceloop.entity.output

gen_ai.output.messages

Installation

pip install opentelemetry-util-genai-traceloop-translator

Quick Start

The translator automatically registers when Traceloop is initialized. See the examples for complete usage:

# Run basic example
python examples/traceloop_processor_example.py

# Run evaluation example
python examples/traceloop_eval_example.py

Evaluations

In order to enable GenAI evaluations for Traceloop spans, the corresponding packages must be installed:

# install evaluation packages
pip install opentelemetry-util-genai-evals opentelemetry-util-genai-evals-deepeval

Also, see .env.example for environment variable setup, which includes setting up configuration for the evaluation provider.

The translator enables GenAI evaluations by converting Traceloop spans to the standardized gen_ai.* format. Once translated, LLM / Agent spans can be evaluated using metrics like:

  • Answer Relevancy - How relevant is the response to the input

  • Faithfulness - Is the response grounded in context

  • Bias/Toxicity - Content safety checks

Evaluations require a compatible evaluation provider (e.g., DeepEval). See examples/traceloop_eval_example.py for a complete example.

Tests

To run the test suite, use the following command: .. code-block:: bash

pytest util/opentelemetry-util-genai-traceloop-translator/tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file splunk_otel_util_genai_translator_traceloop-0.1.10.tar.gz.

File metadata

  • Download URL: splunk_otel_util_genai_translator_traceloop-0.1.10.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"trixie","libc":{"lib":"glibc","version":"2.41"},"name":"Debian GNU/Linux","version":"13"},"implementation":{"name":"CPython","version":"3.11.15"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.5.6 7 Apr 2026","python":"3.11.15","system":{"name":"Linux","release":"5.15.0-1084-aws"}} HTTPX2/2.9.0

File hashes

Hashes for splunk_otel_util_genai_translator_traceloop-0.1.10.tar.gz
Algorithm Hash digest
SHA256 8d9a60b3077909fcd9a4627c1cc3c0e122a4a61bc652ddb66838adff7c2a228a
MD5 079898f0f383813ae6339cd3999d8b0e
BLAKE2b-256 130df0dce0285363d5aa76df60648869b0d3f3fda66b179f3dfc7ce1be90eadf

See more details on using hashes here.

File details

Details for the file splunk_otel_util_genai_translator_traceloop-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: splunk_otel_util_genai_translator_traceloop-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"trixie","libc":{"lib":"glibc","version":"2.41"},"name":"Debian GNU/Linux","version":"13"},"implementation":{"name":"CPython","version":"3.11.15"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.5.6 7 Apr 2026","python":"3.11.15","system":{"name":"Linux","release":"5.15.0-1084-aws"}} HTTPX2/2.9.0

File hashes

Hashes for splunk_otel_util_genai_translator_traceloop-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 4bc7b2d69a69fe435e0f9f6a51402c0c9180415330dca130b2b1567d8b4c474b
MD5 ed78b0e3db44b4cb5dbf137accb76880
BLAKE2b-256 e8ab22a96c9a09138da1df8d27f4e00778824249c6b8560f5cf3a86b9f2d9b11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page