Skip to main content

Simple OpenTelemetry bootstrap for FastAPI, SQLAlchemy, Redis (sync & async)

Project description

otel-bootstrap

Minimal OpenTelemetry bootstrap for Python services.

Features

  • FastAPI tracing
  • SQLAlchemy (sync & async)
  • Redis (sync & async)
  • HTTP / MinIO
  • Trace ↔ Log correlation

Usage

from fastapi import FastAPI
from sqlalchemy.ext.asyncio import create_async_engine
from otel_bootstrap import setup_otel, OtelSettings

app = FastAPI()
engine = create_async_engine("postgresql+asyncpg://...")

setup_otel(
    settings=OtelSettings(service_name="example"),
    fastapi_app=app,
    sqlalchemy_engine=engine,
)

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

otel_bootstrap-0.1.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

otel_bootstrap-0.1.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file otel_bootstrap-0.1.3.tar.gz.

File metadata

  • Download URL: otel_bootstrap-0.1.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for otel_bootstrap-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d7974243963b27565783509e8271371d877bccca11ab6faf3da617e38a31c1fa
MD5 dc3c81529e43ba3f567c4666d4eb31d8
BLAKE2b-256 c5d128db402454df88ef4efea001eea7ce4791cb5ffc91471620eab08d55556c

See more details on using hashes here.

File details

Details for the file otel_bootstrap-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: otel_bootstrap-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for otel_bootstrap-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8661ec6cc9708f1f37679937c8de3c18d11fb06f88b46c863c9655f6f53ab31f
MD5 3a9f14012a1207199170b58a4654e4cf
BLAKE2b-256 c5a456d0de0cc839ea971de60937a809e739f4a73549a794a0487c67397da5e9

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