mapletechlabs/maple/maple-python-style
- community
Checking that the SKILL.md file is still in the repository.
Python OpenTelemetry style for Maple: module-scope tracers/meters, decorators for bounded work, error spans, OTLP-bridged logs via LoggingHandler + LoggingInstrumentor, inline endpoint + ingest key, and no helper-API wrappers.
Install
npx vskill@latest install mapletechlabs/maple/maple-python-styleSKILL.md
The same SKILL.md was published earlier as majiayu000/claude-skill-registry/maple-python-style.
Maple Python style
Acquire OTel objects at module scope.
Bounded work
Use decorators for functions with clear boundaries. The decorator works on both sync and async def functions.
Use a context manager when a decorator does not fit.
Do not use detached tracer.start_span(...); span.end() for bounded work.
Error paths
Record exceptions on the active span.
Logs
If logs are claimed as OTLP-forwarded, configure all of:
- An OTel
LoggerProvider+OTLPLogExporter+LoggingHandler set_logger_provider(logger_provider)fromopentelemetry._logs- Log correlation for existing records, e.g.
LoggingInstrumentor().instrument(set_logging_format=True)
Preserve existing logging.basicConfig, console / file handlers, and log levels. The user's logger keeps working. The OTLP handler sits underneath so log lines carry trace_id / span_id and reach Maple.
Init behavior
Inline the endpoint and ingest key in the init module. Do not read them from env. The ingest key is project-scoped and write-only (shaped like a Sentry DSN), so source-level configuration is the default. Env indirection adds "OTel didn't start because env wasn't set" deploy failures.
Add the _INITIALIZED guard only when the app can realistically call this function more than once (FastAPI lifespan + workers, pytest fixtures, etc.).
Metrics
Counters:
llm.tokens.inputllm.tokens.output- requests/events/jobs/errors
Use UCUM units: token counters use unit="{token}". Do not add app-side llm.cost_usd pricing metrics. Maple does not price tokens; it shows cost only from gen_ai.usage.cost on the LLM span (see maple-onboarding-style "LLM calls").
Histograms:
- duration
- latency
- payload size
Avoid raw high-cardinality values in metric attributes. Prefer tenant/org/project, operation/use case, provider/model, and outcome dimensions over user-level metric tags.
FastAPI
Use the native instrumentation (pip install opentelemetry-instrumentation-fastapi). Do not replace request handling with manual middleware.
Import telemetry (and call init_observability()) before any other module that needs tracing.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/maple-python-style/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mapletechlabs/maple/maple-python-style)