Skip to main content

Official Python SDK for Tracelit with OpenTelemetry.

Project description

Tracelit Python SDK

Drop-in OpenTelemetry SDK for Python that exports traces, metrics, and logs to Tracelit via OTLP/HTTP.

Install

pip install tracelit

Optional extras:

pip install "tracelit[web]"
pip install "tracelit[db]"
pip install "tracelit[all]"

Quick start

import tracelit

tracelit.auto_start(
    api_key="YOUR_KEY",
    service_name="payments-api",
    environment="production",
)

Frameworks

  • Django: add tracelit.integrations.django.TracelitConfig to INSTALLED_APPS
  • FastAPI/Starlette/Sanic/Quart: wrap app with TracelitASGIMiddleware
  • Flask/Pyramid/Bottle/CherryPy: wrap app with TracelitWSGIMiddleware
  • Celery: call install_celery_hook() from tracelit.integrations.celery

Behavior guarantees

  • Non-blocking span export with async error-span queue
  • Never raises setup or exporter failures into customer code
  • Graceful shutdown flush at process exit
  • TRACELIT_ENABLED=false disables telemetry

Configuration

Option Env var Default
api_key TRACELIT_API_KEY required
service_name TRACELIT_SERVICE_NAME unknown-service
environment TRACELIT_ENVIRONMENT production
endpoint TRACELIT_ENDPOINT https://ingest.tracelit.app
sample_rate TRACELIT_SAMPLE_RATE 1.0
enabled TRACELIT_ENABLED true

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

tracelit_python-0.1.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

tracelit_python-0.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tracelit_python-0.1.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tracelit_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e8d82272ee7b578942c857e784af80a0fdb6af75cc42cb74419947083590007f
MD5 2bb74c0263730225d92e3a50aa743941
BLAKE2b-256 102f7ef8992a03c5e17648cc66bdbd59d0b0e8401de24c94020a50ac56e17dc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracelit_python-0.1.0.tar.gz:

Publisher: release.yml on Tracelit-AI/tracelit-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: tracelit_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tracelit_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90da4bd55181f4fb6ee0c642c4417fe908730dcae59142526d91c92a42f0c2ce
MD5 60269dadc90ca794fc6a359c75fc2f0f
BLAKE2b-256 681cd228f56c4e89c64fecc58061046a4c3061415b020328019065ed0bbc270c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracelit_python-0.1.0-py3-none-any.whl:

Publisher: release.yml on Tracelit-AI/tracelit-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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