opentelemetry · OpenTelemetry Docs
Python Getting Started by Example
A step-by-step guide to instrumenting a Python Flask application using zero-code instrumentation to emit traces, metrics, and logs to the console.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Python Getting Started by Example
A step-by-step guide to instrumenting a Python Flask application using zero-code instrumentation to emit traces, metrics, and logs to the console.
When To Use
Use when you need to implement automatic telemetry collection for a Python web application using the OpenTelemetry agent.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/python-getting-started-by-workflow-guide.md | A guide providing a step-by-step walkthrough for instrumenting a Python application with OpenTelemetry using an HTTP server example. | Questions about a guide providing a step-by-step walkthrough for instrumenting a Python application with OpenTelemetry using an HTTP... |
examples/python-getting-started-by-opentelemetry-python-getting-started-pip-insta.shell | Shell commands to install the Flask framework and OpenTelemetry Python packages via pip. | Exact payloads, commands, or snippets shown in Shell commands to install the Flask framework and OpenTelemetry Python packages via pip. |
examples/python-getting-started-by-opentelemetry-python-flask-instrumentation.python | A Python Flask application demonstrating basic OpenTelemetry instrumentation using a dice roll route. | Exact payloads, commands, or snippets shown in A Python Flask application demonstrating basic OpenTelemetry instrumentation using a dice roll route. |
examples/python-getting-started-by-opentelemetry-python-flask-run.sh | A shell command to run a Flask application on port 8080 as part of the OpenTelemetry Python getting started guide. | Exact payloads, commands, or snippets shown in A shell command to run a Flask application on port 8080 as part of the OpenTelemetry Python getting started guide. |
examples/python-getting-started-by-opentelemetry-python-getting-started-pip-insta-2.shell | Shell commands to install the OpenTelemetry Python distro using pip. | Exact payloads, commands, or snippets shown in Shell commands to install the OpenTelemetry Python distro using pip. |
examples/python-getting-started-by-opentelemetry-python-bootstrap-install-command.shell | A shell command used to install OpenTelemetry Python instrumentation via the opentelemetry-bootstrap utility. | Exact payloads, commands, or snippets shown in A shell command used to install OpenTelemetry Python instrumentation via the opentelemetry-bootstrap utility. |
examples/python-getting-started-by-opentelemetry-python-span.json | A JSON object representing a sample span with trace context, attributes, and timing metadata for OpenTelemetry Python instrumentation. | Exact payloads, commands, or snippets shown in A JSON object representing a sample span with trace context, attributes, and timing metadata for OpenTelemetry Python... |
examples/python-getting-started-by-opentelemetry-python-resourcemetrics.json | A JSON representation of OpenTelemetry Python resource metrics including service attributes and telemetry SDK versions. | Exact payloads, commands, or snippets shown in A JSON representation of OpenTelemetry Python resource metrics including service attributes and telemetry SDK versions. |
examples/python-getting-started-by-opentelemetry-python-flask-tracer.python | A Python script using Flask and OpenTelemetry to demonstrate manual span creation within a web route. | Exact payloads, commands, or snippets shown in A Python script using Flask and OpenTelemetry to demonstrate manual span creation within a web route. |
examples/python-getting-started-by-opentelemetry-python-span-attributes.json | A JSON object representing a span with trace context, attributes, and timing information for OpenTelemetry Python instrumentation. | Exact payloads, commands, or snippets shown in A JSON object representing a span with trace context, attributes, and timing information for OpenTelemetry Python ins... |
examples/python-getting-started-by-opentelemetry-python-getting-started-dice-roll.python | A Python implementation of a dice roller application demonstrating basic OpenTelemetry tracing and metrics instrumentation. | Exact payloads, commands, or snippets shown in A Python implementation of a dice roller application demonstrating basic OpenTelemetry tracing and metrics instrument... |
examples/python-getting-started-by-opentelemetry-python-resourcemetrics-2.json | A JSON representation of OpenTelemetry Python resource metrics including SDK attributes and instrumentation scope data. | Exact payloads, commands, or snippets shown in A JSON representation of OpenTelemetry Python resource metrics including SDK attributes and instrumentation scope data. |
examples/python-getting-started-by-opentelemetry-collector-config.yaml | A YAML configuration file for the OpenTelemetry Collector defining OTLP receivers and debug exporters for traces, metrics, and logs. | Exact payloads, commands, or snippets shown in A YAML configuration file for the OpenTelemetry Collector defining OTLP receivers and debug exporters for traces, met... |
examples/python-getting-started-by-opentelemetry-python-pip-install-otlp-exporter.shell | Shell command to install the OpenTelemetry OTLP exporter package using pip. | Exact payloads, commands, or snippets shown in Shell command to install the OpenTelemetry OTLP exporter package using pip. |
examples/python-getting-started-by-opentelemetry-python-getting-started-debug-exp.text | A text log showing the debug exporter output for an OpenTelemetry Python resource span. | Exact payloads, commands, or snippets shown in A text log showing the debug exporter output for an OpenTelemetry Python resource span. |
What This Skill Covers
- Get telemetry for your app in less than 5 minutes!
- Main sections:
Prerequisites,Example Application,Installation,Create and launch an HTTP Server,Instrumentation.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://opentelemetry.io/docs/languages/python/getting-started