scaffold-observability
Configure ArchiPy 5.x OpenTelemetry traces, metrics, logs, and instrumentation.
Skill by SyntaxArc
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/syntaxarc-scaffold-observability
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/scaffold-observability
What's inside
- Skill name
scaffold-observability- Description
- Configure ArchiPy 5.x OpenTelemetry traces, metrics, logs, and instrumentation. Use for "add tracing/metrics/OTel", "Prometheus/Pushgateway", or migrating off Sentry, Elastic APM, or old Prometheus.
- License
- MIT
- Instructions
- 135 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Scaffold ArchiPy OpenTelemetry
## Read first
Read these plugin rules in full before generating files (paths relative to this skill directory; Claude Code: `${CLAUDE_SKILL_DIR}/../../rules/`):
- `../../rules/config-and-di.mdc`
## 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, metrics exporter (`otlp` / `pull` /
`pushgateway`), OTLP endpoint/protocol or Pushgateway URL, 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` (no separate extra) |
| 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
# Pull scrape: OTEL__METRICS_EXPORTER=pull
# Pushgateway: OTEL__METRICS_EXPORTER=pushgateway
# OTEL__METRICS_PUSHGATEWAY_URL=http://pushgateway.monitoring:9091
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
OTEL__FASTAPI_EXCLUDED_URLS=health,docs,redoc,openapi.json
```
Use `BaseConfig.OTEL`; ArchiPy builds providers programmatically. Do not rely on OpenTelemetry SDK `OTEL_*`
autoconfiguration. For `http/protobuf`, use port 4318; ArchiPy appends `/v1/{signal}` when the base endpoint has no path.
Set `OTEL__METRICS_EXPORTER=pull` for scrape-only metrics. Set `OTEL__METRICS_EXPORTER=pushgateway`
and `OTEL__METRICS_PUSHGATEWAY_URL` (job defaults to `SERVICE_NAME`) for Prometheus Pushgateway —
no local `/metrics` server. `otlp` pushes OTLP to a collector; do not confuse it with Pushgateway.
If pull scrape cannot bind, ArchiPy logs a warning and keeps traces/logs/metrics providers.
Set `OTEL__LOGS_EXPORTER=otlp` to push logs to a collector (default `console` writes INFO/DEBUG to
stdout and WARNING+ to stderr).
## Initialize before adapters
After `BaseConfig.set_global(config)` and before constructing the DI container/adapters:
```python
from archipy.configs.base_config import BaseConfig
from archipy.helpers.utils.otel_utils import OtelUtils
config = AppConfig()
BaseConfig.set_global(config)
OtelUtils.init_otel_if_needed(config)
container = ApplicationContainer()
```
Initialization is idempotent. AppUtils calls it again safely. Early initialization matters for SQLAlchemy engines,
Kafka clients, ScyllaDB sessions, and logs created during bootstrap.
## Instrument application code
- FastAPI: `AppUtils.create_fastapi_app(config)` with `archipy[otel,fastapi]`.
- gRPC server: `create_grpc_app` / `create_async_grpc_app` with `archipy[otel-grpc]`.
- Traces: contrib server interceptor when `OTEL.TRACES_ENABLED`.
- Metrics: ArchiPy `GrpcServerOtelMetricsInterceptor` /
`AsyncGrpcServerOtelMetricsInterceptor` records `rpc.server.call.duration` when
`OTEL.METRICS_ENABLED` (works without traces).
- Tuning (archipy >= 5.16.0): `OTEL.TRACES_SAMPLER`, `PROPAGATORS` (`b3`, `b3multi`; B3 ships in `archipy[otel]`),
`OTLP_COMPRESSION` (`none` by default), `SPAN_BATCH_*`, `RESOURCE_DETECTORS`; `USE_STANDARD_ENV` makes the standard
`OTEL_*` variables fill unset settings.
- gRPC clients: `OtelUtils.grpc_client_interceptors()` / `async_grpc_client_interceptors()`.
- Traces: `trace_root`, `trace_span`, `async_trace_root`, `async_trace_span`, `trace_class`.
- Metrics: `measure_duration`, `async_measure_duration`, `count_calls`, `async_count_calls`.
- Exceptions: `BaseUtils.capture_exception` records on the current span.
Import decorators from `archipy.helpers.decorators`. `measure_duration`, `count_calls`, `trace_span` and `trace_root` detect `async def`; the `async_*` twins remain.
Only capture non-sensitive argument names in trace attributes.
## ArchiPy 4.x migration
- `TracingUtils` → `OtelUtils`
- `capture_transaction` / `capture_span` → `trace_root` / `trace_span` (+ async twins)
- Prometheus/Sentry/Elastic APM config → `BaseConfig.OTEL`
- Removed FastAPI rate-limit handler → `fastapi-redis-sdk`
## Do not
- Never commit OTLP credentials; no secrets in source, logs, or committed env files.From SyntaxArc/archipy-plugin, MIT.
More from SyntaxArc/archipy-plugin
- 0.601score
scaffold-decorator
SyntaxArc
Add or wire helpers/decorators, preferring ArchiPy's (ttl_cache, atomic UoW, trace_span, measure_duration, retry).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-models
SyntaxArc
Scaffold ArchiPy models under models/: domain/repository DTOs, errors, optional entities and types.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-domain
SyntaxArc
Scaffold a full ArchiPy domain slice (DTOs, errors, repository + adapter, logic, service).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
redis-search
SyntaxArc
Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-app
SyntaxArc
Bootstrap a new ArchiPy service layout (configs, models, repositories, logics, services, helpers, manage.py).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-logic
SyntaxArc
Scaffold an ArchiPy logic (use case) under logics/{domain}/ with a unit-of-work decorator and DTO I/O.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
archipy-docs
SyntaxArc
Answer how-to questions about ArchiPy 5.x in an app (config, DI, adapters, helpers, errors, layout, observability) from the bundled reference and live docs.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-interceptor
SyntaxArc
Add or wire cross-cutting FastAPI/gRPC interceptors or middleware, preferring ArchiPy's.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-health-checks
SyntaxArc
Scaffold FastAPI/gRPC liveness, readiness, and startup health checks, graceful shutdown, and optional Kubernetes probes.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-adapter
SyntaxArc
Scaffold a domain adapter under repositories/{domain}/adapters/ wrapping an ArchiPy adapter or external client.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-bdd
SyntaxArc
Scaffold Behave BDD tests that drive an ArchiPy app through its REST/gRPC services layer against real testcontainers (Postgres, Redis, Kafka, Temporal, …).
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
docs-observability
SyntaxArc
Open ArchiPy OpenTelemetry guidance (traces, metrics, logs)
SkillAFreshness: A★ 3Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Oct 18, 2026 (9 days ago)
- Last release
- Oct 18, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/SyntaxArc/archipy-plugin
- Website
- syntaxarc.github.io/ArchiPy/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from SyntaxArc
- 0.601score
archipy-docs
SyntaxArc
Answer how-to questions about ArchiPy 5.x in an app (config, DI, adapters, helpers, errors, layout, observability) from the bundled reference and live docs.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-adapter
SyntaxArc
Scaffold a domain adapter under repositories/{domain}/adapters/ wrapping an ArchiPy adapter or external client.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
redis-search
SyntaxArc
Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-app
SyntaxArc
Bootstrap a new ArchiPy service layout (configs, models, repositories, logics, services, helpers, manage.py).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-logic
SyntaxArc
Scaffold an ArchiPy logic (use case) under logics/{domain}/ with a unit-of-work decorator and DTO I/O.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-bdd
SyntaxArc
Scaffold Behave BDD tests that drive an ArchiPy app through its REST/gRPC services layer against real testcontainers (Postgres, Redis, Kafka, Temporal, …).
SkillAFreshness: A★ 3Claude Code +9
Cite this page
scaffold-observability skill. Agent Mart. https://agentmart.dev/skills/syntaxarc-scaffold-observability (last updated 2026-10-24)