scaffold-archipy-observabilitylisted
Install: claude install-skill SyntaxArc/archipy-plugin
# Scaffold ArchiPy OpenTelemetry
## Before writing files
1. Inspect `pyproject.toml`/`uv.lock`, `AppConfig`, bootstrap order, app transports, adapters, and `.env.example`.
2. Infer required instrumentation extras from the installed stack.
3. Ask only for unresolved choices: enabled signals, OTLP endpoint/protocol, service name, sampling ratio, and log level.
4. Preserve existing config/bootstrap. Never write collector credentials or OTLP headers with secret values.
## Install only matching extras
| Stack | Extra |
|-------|-------|
| Core OTLP traces, metrics, logs | `otel` |
| FastAPI | `otel-fastapi` |
| gRPC | `otel-grpc` |
| SQLAlchemy | `otel-sqlalchemy` |
| Redis | `otel-redis` |
| Elasticsearch | `otel-elasticsearch` |
| Kafka | `otel-kafka` |
| ScyllaDB | `otel-scylladb` |
| MinIO/botocore | `otel-minio` |
Combine required extras, for example:
```bash
uv add "archipy[otel-fastapi,otel-sqlalchemy,otel-redis]"
```
Do not use removed ArchiPy 4.x extras: `prometheus`, `sentry`, or `elastic-apm`.
## Configure
Add non-secret defaults/documentation to `.env.example`:
```bash
OTEL__IS_ENABLED=true
OTEL__SERVICE_NAME=my-service
OTEL__OTLP_ENDPOINT=http://localhost:4317
OTEL__PROTOCOL=grpc
OTEL__TRACES_ENABLED=true
OTEL__METRICS_ENABLED=true
OTEL__METRICS_EXPORTER=otlp
OTEL__METRICS_PULL_HOST=0.0.0.0
OTEL__METRICS_PULL_PORT=8200
OTEL__SYSTEM_METRICS_ENABLED=true
OTEL__LOGS_ENABLED=true
OTEL__LOGS_EXPORTER=console
OTEL__TRACES_SAMPLE_RATIO=0.1
OTEL__LOGS_LEVEL=WARNING