Skip to main content

Thin OpenTelemetry wrapper that connects Python apps to TraceMap in 5 lines

Project description

TraceMap Python SDK (FastAPI/ASGI)

Drop-in middleware for ASGI apps that emits spans/logs to TraceMap.

Quick Start

from fastapi import FastAPI
from tracemap import TraceMapMiddleware

app = FastAPI()
app.add_middleware(TraceMapMiddleware)

Environment Variables

  • TRACEMAP_ENDPOINT (default http://127.0.0.1:4318)
  • TRACEMAP_COLLECTOR_URL (fallback)
  • TRACEMAP_SERVICE_NAME (default my-service)
  • TRACEMAP_API_KEY (optional)
  • TRACEMAP_ENABLED (default true)

Endpoint Modes

  • Cloud/API mode (.../api/ingest): sends spans to /api/ingest and logs to /logs
  • Collector mode: sends spans to /collect/spans and logs to /collect/logs

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

tracemap_python-1.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

tracemap_python-1.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file tracemap_python-1.0.1.tar.gz.

File metadata

  • Download URL: tracemap_python-1.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tracemap_python-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6cb0b9f057940ab837116efe22b06cd6e7d4634ed2f179147d03baafd5597e89
MD5 1e2e949bb8a8eea6bfdf1d5216815a8c
BLAKE2b-256 dfbf92a57b29e3426b532f089a6e4030a2e07b4fc288deef2ff9505a3a5a1e1a

See more details on using hashes here.

File details

Details for the file tracemap_python-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tracemap_python-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 053c22969d9899b58bd6a3a768b7fa92e221365f7fa0495ff931d120d290e8dc
MD5 8ff6e22d78a432b65b301f091acf9abe
BLAKE2b-256 ed801391a58dba788bbc083c1ceb35ecce510d4effefdbdcfe5f5e52c0bb0596

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