Automagik Telemetry - Python SDK
📚 Complete Documentation | 🚀 Main README | ⚙️ Configuration Guide
Privacy-first OpenTelemetry SDK for Python applications with zero dependencies and 100% test coverage.
Installation
pip install automagik-telemetry
Requirements: Python 3.12+
Quick Start
from automagik_telemetry import AutomagikTelemetry, MetricType
# Initialize client
client = AutomagikTelemetry(
project_name="my-app",
version="1.0.0"
)
# Track events (traces)
client.track_event("user.login", {
"user_id": "anonymous-123",
"method": "oauth"
})
# Track metrics (counter, gauge, histogram)
client.track_metric("api.requests", value=1, metric_type=MetricType.COUNTER, attributes={
"endpoint": "/api/users",
"status": 200
})
Key Configuration
Batch Size (Default: batch_size=1)
# Default: Send immediately (low latency)
client = AutomagikTelemetry(project_name="my-app", version="1.0.0")
# Enable batching for high-volume apps
client = AutomagikTelemetry(
project_name="my-app",
version="1.0.0",
batch_size=100 # Batch 100 events before sending
)
Backend Selection
# OTLP Backend (default - production)
client = AutomagikTelemetry(
project_name="my-app",
version="1.0.0",
endpoint="https://telemetry.namastex.ai"
)
# ClickHouse Backend (self-hosting)
client = AutomagikTelemetry(
project_name="my-app",
version="1.0.0",
backend="clickhouse",
clickhouse_endpoint="http://localhost:8123"
)
Environment Variables
# Disable telemetry
export AUTOMAGIK_TELEMETRY_ENABLED=false
# Auto-disable in development
export ENVIRONMENT=development
# Custom OTLP endpoint
export AUTOMAGIK_TELEMETRY_ENDPOINT=https://your-collector.com
# ClickHouse backend
export AUTOMAGIK_TELEMETRY_BACKEND=clickhouse
export AUTOMAGIK_TELEMETRY_CLICKHOUSE_ENDPOINT=http://localhost:8123
See Configuration Guide for all options.
Development
# Install dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run tests with coverage
pytest --cov=automagik_telemetry --cov-report=html
# Type checking
mypy src/automagik_telemetry
# Linting
ruff check src tests
Documentation
- Getting Started - Complete setup guide
- Configuration - All configuration options
- Backends Guide - OTLP vs ClickHouse comparison
- API Reference - Complete API documentation
- SDK Differences - Python vs TypeScript
- Troubleshooting - Common issues and solutions
Python-Specific Features
- Sync and async methods:
track_event()(sync) andtrack_event_async()(async) - snake_case naming: Follows PEP 8 conventions (
track_event,project_name) - Type hints: Full type safety with mypy strict mode
- Time units:
flush_intervalin seconds (float)
See SDK Differences for Python vs TypeScript comparison.
License
MIT - see LICENSE for details.
Metadata
Release files for automagik-telemetry 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| automagik_telemetry-0.1.4.tar.gz | 112.7 kB | Without provenance | Details for automagik_telemetry-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| automagik_telemetry-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for automagik_telemetry-0.1.4-py3-none-any.whl |
Total release size: 140.4 kB
Release files / automagik_telemetry-0.1.4.tar.gz
| Download URL | automagik_telemetry-0.1.4.tar.gz |
|---|---|
| Size | 112.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8926e574ad9226b850ae603a25b03f16bcf123f43c8fdb3a64e9462dbf6a37d5
|
|
BLAKE2b-256 checksum How to use checksums |
c67893cf16c8c612bc3083d86940e759901e8001e3e4636ab780cb17528facb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / automagik_telemetry-0.1.4-py3-none-any.whl
| Download URL | automagik_telemetry-0.1.4-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
834ce388b8351957c1da3f232f79f22b42e6882803716b32a101956548b44d10
|
|
BLAKE2b-256 checksum How to use checksums |
3e86cb6d847151fdf18c87a479288158540cc6bb840333b00db1be94af7be950
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for automagik-telemetry 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.