Skip to main content

OpenTelemetry SDK for AI/LLM observability with SideSeat

Project description

SideSeat Python SDK

OpenTelemetry SDK for AI/LLM observability with SideSeat.

Installation

pip install sideseat

Quick Start

from sideseat import SideSeatTelemetry

# Initialize telemetry
telemetry = SideSeatTelemetry()

# Configure exporters (chainable)
telemetry.setup_otlp_exporter(endpoint="http://localhost:5388/otel/default/v1/traces")
telemetry.setup_console_exporter()

# Your AI/LLM code here...

# Graceful shutdown (also registered with atexit for file exporters)
telemetry.shutdown()

Features

  • Easy Setup: One-liner OpenTelemetry configuration
  • Binary Encoding: Automatic base64 encoding for images/audio
  • Multiple Exporters: OTLP, Console, and JSONL file output
  • Framework Support: Works with Strands, LangChain, CrewAI, AutoGen
  • Method Chaining: Fluent API for configuration
  • Thread-Safe: Safe for concurrent use

Configuration

Custom Service Name

telemetry = SideSeatTelemetry(
    service_name="my-ai-app",
    service_version="1.0.0",
)

By default, the SDK auto-detects common AI frameworks (Strands, LangChain, CrewAI, AutoGen).

Disable Binary Encoding

telemetry = SideSeatTelemetry(encode_binary_as_base64=False)

Exporters

OTLP (recommended)

telemetry.setup_otlp_exporter(
    endpoint="http://localhost:5388/otel/default/v1/traces"
)

Console

telemetry.setup_console_exporter()

File (JSONL)

# Append mode (default) - safe for multiple runs
telemetry.setup_file_exporter(path="traces.jsonl")

# Overwrite mode
telemetry.setup_file_exporter(path="traces.jsonl", mode="w")

Metrics

telemetry.setup_meter(
    enable_console_exporter=True,
    enable_otlp_exporter=True,
)

Utilities

encode_value

Encode Python values for JSON, with base64 encoding for binary data:

from sideseat import encode_value

encode_value(b"binary")           # "YmluYXJ5" (base64)
encode_value({"key": b"value"})   # {"key": "dmFsdWU="}
encode_value({1, 2, 3})           # [1, 2, 3] (sorted list)

License

MIT

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

sideseat-0.1.0.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

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

sideseat-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file sideseat-0.1.0.tar.gz.

File metadata

  • Download URL: sideseat-0.1.0.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for sideseat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f0079358ca419f160eda72e37cd10e953ff17b5e54788731d862de02ef5d7929
MD5 7b5c104bd74315dfa204cfb3e66e4c76
BLAKE2b-256 6dfd93f7df11266cdaba0c8c1cc350d5147d86791c7f43051c7f8b090b8dc29e

See more details on using hashes here.

File details

Details for the file sideseat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sideseat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for sideseat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 175dee424d8302d08e5261dafe3aff92577c472dca4b428917528893d7f51736
MD5 d7760098af3571cbf654f44869852e09
BLAKE2b-256 7f7968613e157b4891911a3e30d729aae4ec1ac4a1df18fe495386a6468f8229

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