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.0.tar.gz (1.5 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.0-py3-none-any.whl (1.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for otel_bootstrap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7a8bfe7d405504155855def86b49ea08c291d5ed0317222fdae1901bf61ce7f6
MD5 d9661b66269166f49960a38a0e898988
BLAKE2b-256 147a7bc315663ecd7790f1768e7683ac4e6fff87906f5da2946eee65e76effe1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for otel_bootstrap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08a27134221da6e7315ecdf1dde5aeee3a0df63e883e47366340708bb02c8aa5
MD5 e062ab5adfd05cb58a0d20fd8dac16c8
BLAKE2b-256 7beb508cc0e6d1b5eac16756ffcee3b285d908d394649e85ad77730b07833a0e

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