Skip to main content

Vestigio

English Version | 中文版

Thin OTEL wrapper for agent/LLM observability.

From Latin vestigium — "trace, footprint." Vestigio provides agent-native instrumentation using OpenInference and OTel GenAI semantic conventions.

Features

  • Three span types: agent_span(), llm_span(), tool_span() — context managers with proper semantic attributes
  • Dual conventions: Sets both OpenInference and OTel GenAI attributes for maximum backend compatibility
  • Error recording: set_span_error() / set_span_ok() for status mapping and exception tracking
  • Session tracking: session_id, user_id, and arbitrary metadata on agent spans
  • Zero overhead when disabled: No-op stubs when OTEL SDK is not installed or telemetry is off
  • No required dependencies: OTEL is optional (pip install vestigio[otel])

Install

pip install vestigio           # core only, spans are silent stubs
pip install vestigio[otel]     # + OTEL SDK, enables real tracing
pip install vestigio[otlp]     # + OTLP exporter for Jaeger, Tempo, etc.

Quick Start

from vestigio import (
    init_telemetry,
    agent_span,
    llm_span,
    tool_span,
    set_span_error,
    set_span_ok,
)
from vestigio._spans import set_llm_usage, set_agent_output

tracer = init_telemetry()

with agent_span(
    tracer,
    task="what's the weather?",
    model="gpt-4",
    session_id="sess-001",
    user_id="user-42",
    metadata={"source": "cli"},
) as root:
    with llm_span(tracer, model="gpt-4", provider="openai") as llm:
        response = call_llm(...)
        set_llm_usage(llm, {"prompt_tokens": 100, "completion_tokens": 50, "total_tokens": 150})

    with tool_span(tracer, tool_name="get_weather") as tool:
        try:
            result = call_tool(...)
            set_span_ok(tool)
        except Exception as e:
            set_span_error(tool, e)

    set_agent_output(root, "The weather is sunny.")
    set_span_ok(root)

Configuration

Env Var Default Description
VESTIGIO_ENABLED false Master switch (1, true, yes)
VESTIGIO_ENDPOINT http://localhost:4317 OTLP endpoint
VESTIGIO_CONSOLE false Console exporter for dev
OTEL_SERVICE_NAME vestigio Standard OTEL service name

Custom env var prefix for downstream consumers:

from vestigio import VestigioConfig, init_telemetry

config = VestigioConfig.from_env(prefix="TALPA_OTEL")
tracer = init_telemetry(config=config)

Compatible Backends

Any OTLP-compatible backend: Jaeger, Grafana Tempo, Arize Phoenix, Honeycomb, Datadog, etc.

License

MIT

Metadata

Release files for vestigio 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vestigio 0.1.0
File Size Uploaded
vestigio-0.1.0.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vestigio 0.1.0
File Interpreter ABI Platform
vestigio-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / vestigio-0.1.0.tar.gz

Download URL vestigio-0.1.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
29c6d8b363795b71f670b5fa5d6be471fa91f44565f7801a2987c95881824fe1
BLAKE2b-256 checksum
How to use checksums
84c9c1226c44d70e1c1678e07f0b9cc19c8aeb0bda761005b0d2b9818b8e6cb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / vestigio-0.1.0-py3-none-any.whl

Download URL vestigio-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c7c3bfc2ee374f9932f0adc026c6607093bac80506be5ab48ef290c46029657
BLAKE2b-256 checksum
How to use checksums
58f3b813138f8ca155abe1fb4558ef5cd8d698f860f918f65fe013eeaffad5ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page