semvec/pypi-packages huggingface dataset:
splunk-otel-util-genai-translator-traceloop 0.1.8
Traceloop -> GenAI translator emitter for OpenTelemetry GenAI
Requires Python: >=3.9

OpenTelemetry GenAI Traceloop Translator
=========================================

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
------------
.. code-block:: bash

   pip install opentelemetry-util-genai-traceloop-translator

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

- **Basic Example**: `examples/traceloop_processor_example.py <examples/traceloop_processor_example.py>`_ - Demonstrates workflow, agent, task, and tool decorators with automatic span translation.

- **Evaluation Example**: `examples/traceloop_eval_example.py <examples/traceloop_eval_example.py>`_ - Shows how to run GenAI evaluations on translated spans.

.. code-block:: bash

   # 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:

.. code-block:: bash

   # 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 <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
qfi 0.0.1
Quantitative Finance Toolkit
Requires Python: <4.0,>=3.10
Keywords: python

# qfi

[![Release](https://img.shields.io/github/v/release/ggianfran/qfi)](https://img.shields.io/github/v/release/ggianfran/qfi)
[![Build status](https://img.shields.io/github/actions/workflow/status/ggianfran/qfi/main.yml?branch=main)](https://github.com/ggianfran/qfi/actions/workflows/main.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/ggianfran/qfi/branch/main/graph/badge.svg)](https://codecov.io/gh/ggianfran/qfi)
[![Commit activity](https://img.shields.io/github/commit-activity/m/ggianfran/qfi)](https://img.shields.io/github/commit-activity/m/ggianfran/qfi)
[![License](https://img.shields.io/github/license/ggianfran/qfi)](https://img.shields.io/github/license/ggianfran/qfi)

Quantitative Finance Toolkit

- **Github repository**: <https://github.com/ggianfran/qfi/>
- **Documentation** <https://ggianfran.github.io/qfi/>

## Getting started with your project

### 1. Create a New Repository

First, create a repository on GitHub with the same name as this project, and then run the following commands:

```bash
git init -b main
git add .
git commit -m "init commit"
git remote add origin git@github.com:ggianfran/qfi.git
git push -u origin main
```

### 2. Set Up Your Development Environment

Then, install the environment and the pre-commit hooks with

```bash
make install
```

This will also generate your `uv.lock` file

### 3. Run the pre-commit hooks

Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run:

```bash
uv run pre-commit run -a
```

### 4. Commit the changes

Lastly, commit the changes made by the two steps above to your repository.

```bash
git add .
git commit -m 'Fix formatting issues'
git push origin main
```

You are now ready to start development on your project!
The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.

To finalize the set-up for publishing to PyPI, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/publishing/#set-up-for-pypi).
For activating the automatic documentation with MkDocs, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/mkdocs/#enabling-the-documentation-on-github).
To enable the code coverage reports, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/codecov/).

## Releasing a new version



---

Repository initiated with [fpgmaas/cookiecutter-uv](https://github.com/fpgmaas/cookiecutter-uv).