$npx -y skills add ollygarden/opentelemetry-agent-skills --skill otel-pythonOpenTelemetry in Python — SDK setup, declarative config, zero-code instrumentation (opentelemetry-instrument, opentelemetry-distro), contrib auto-instrumentation, manual API, performance tuning, breaking changes. Use when configuring or troubleshooting OpenTelemetry in a Python s
| 1 | # OpenTelemetry in Python |
| 2 | |
| 3 | Entry point for OpenTelemetry mechanics in Python services. Load a reference below based on |
| 4 | the task; each reference is self-contained. |
| 5 | |
| 6 | ## References |
| 7 | |
| 8 | | File | Use when | |
| 9 | |---|---| |
| 10 | | [`references/declarative-setup.md`](references/declarative-setup.md) | Configuring the SDK via declarative YAML (`opentelemetry-configuration` / `opentelemetry.configuration`): `load_config_file`, `configure_sdk`, `file_format`, env substitution, `OTEL_CONFIG_FILE` and programmatic activation. | |
| 11 | | [`references/api.md`](references/api.md) | Import paths, global API access, tracer/meter/logger usage, attributes, propagation, the Python logging bridge (`LoggingHandler`). | |
| 12 | | [`references/instrumentation-libraries.md`](references/instrumentation-libraries.md) | Zero-code (`opentelemetry-distro`, `opentelemetry-bootstrap`, `opentelemetry-instrument`), the contrib catalog, and manual instrumentation following semconv. | |
| 13 | | [`references/performance.md`](references/performance.md) | Tuning sampling, batch span processor, periodic metric reader, views, asyncio context, exporters, graceful shutdown. | |
| 14 | | [`references/breaking-changes.md`](references/breaking-changes.md) | Auditing existing code for deprecated/renamed APIs and semconv changes across recent SDK/contrib releases. | |
| 15 | |
| 16 | ## Sources of Truth |
| 17 | |
| 18 | For YAML schema details, fetch the upstream sources listed in the `otel-declarative-config` skill. |
| 19 | For Python-specific facts: |
| 20 | |
| 21 | | Fact | Fetch | |
| 22 | |---|---| |
| 23 | | Latest `opentelemetry-sdk` / `opentelemetry-api` | `WebFetch https://pypi.org/pypi/opentelemetry-sdk/json` (`.info.version`) | |
| 24 | | Latest `opentelemetry-configuration` | `WebFetch https://pypi.org/pypi/opentelemetry-configuration/json` | |
| 25 | | Latest `opentelemetry-distro` | `WebFetch https://pypi.org/pypi/opentelemetry-distro/json` | |
| 26 | | Latest `opentelemetry-instrumentation-<pkg>` (contrib) | `WebFetch https://pypi.org/pypi/opentelemetry-instrumentation-<pkg>/json` | |
| 27 | | Latest OTLP exporter | `WebFetch https://pypi.org/pypi/opentelemetry-exporter-otlp/json` | |
| 28 | | Declarative config support (released 1.44.0 overview) | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-python/v1.44.0/opentelemetry-configuration/README.rst` | |
| 29 | | Declarative config vendored schema (released 1.44.0) | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-python/v1.44.0/opentelemetry-configuration/src/opentelemetry/configuration/schema.json` | |
| 30 | | SDK CHANGELOG through 1.44.0 | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-python/v1.44.0/CHANGELOG.md` | |
| 31 | | Contrib CHANGELOG through 0.65b0 | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-python-contrib/v0.65b0/CHANGELOG.md` | |
| 32 | | Python getting-started docs | `WebFetch https://opentelemetry.io/docs/languages/python/getting-started/` | |
| 33 | |
| 34 | ## Cross-References |
| 35 | |
| 36 | - Schema-level facts: `otel-declarative-config` skill (language-agnostic YAML schema sources). |
| 37 | - SDK version selection across languages: `otel-sdk-versions` skill. |
| 38 | - Semantic conventions lookup: `otel-semantic-conventions` skill. |