diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index 34a62cc53ae7..e2f956661ebd 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -5,7 +5,7 @@ weight: 11 description: An implementation of auto-instrumentation using the OpenTelemetry Operator. # prettier-ignore -cSpell:ignore: autoinstrumentation GRPCNETCLIENT k8sattributesprocessor otelinst otlpreceiver PTRACE REDISCALA +cSpell:ignore: autoinstrumentation GRPCNETCLIENT k8sattributesprocessor otelinst otlpreceiver PTRACE REDISCALA Werkzeug --- The OpenTelemetry Operator supports injecting and configuring @@ -317,6 +317,10 @@ spec: EOF ``` +> **Note**: OpenTelemetry Python automatic instrumentation does not support +> Flask or Werkzeug 3.0+ at this time. See the troubleshooting section +> [No Data When Using Flask](/docs/languages/python/automatic#no-data-when-using-flask) + By default, the `Instrumentation` resource that auto-instruments Python services uses `otlp` with the `http/protobuf` protocol (gRPC is not supported at this time). This means that the configured endpoint must be able to receive OTLP over diff --git a/content/en/docs/languages/python/automatic/_index.md b/content/en/docs/languages/python/automatic/_index.md index f136f7c91f72..d07228ad5486 100644 --- a/content/en/docs/languages/python/automatic/_index.md +++ b/content/en/docs/languages/python/automatic/_index.md @@ -2,7 +2,8 @@ title: Automatic Instrumentation linkTitle: Automatic weight: 30 -cSpell:ignore: devel distro mkdir myapp uninstrumented virtualenv +# prettier-ignore +cSpell:ignore: devel distro mkdir myapp pyproject uninstrumented virtualenv Werkzeug --- Automatic instrumentation with Python uses a Python agent that can be attached @@ -74,6 +75,19 @@ You can find the full list ## Troubleshooting +### No data when using Flask + +Using OpenTelemetry with Flask requires both Flask and Werkzeug versions as < +3.0. Because Flask 2.x does not specify Werkzeug as < 3.0, conflicts can arise. + +Ensure your Flask version is < 3.x, and specify the Werkzeug version explicitly +as < 3.0. For example, in a `pyproject.toml` file: + +```console +flask = "2.2.2" +Werkzeug = "2.2.2" +``` + ### Python package installation failure The Python package installs require `gcc` and `gcc-c++`, which you may need to diff --git a/content/en/docs/languages/python/automatic/example.md b/content/en/docs/languages/python/automatic/example.md index 6112ccf534a4..bdd3c8eceadd 100644 --- a/content/en/docs/languages/python/automatic/example.md +++ b/content/en/docs/languages/python/automatic/example.md @@ -105,7 +105,8 @@ pip install 'flask<3' 'werkzeug<3' requests ``` > **Note**: OpenTelemetry Python automatic instrumentation does not support -> Flask or Werkzeug 3.0+ at this time. +> Flask or Werkzeug 3.0+ at this time. See the troubleshooting section +> [No Data When Using Flask](/docs/languages/python/automatic#no-data-when-using-flask) Run the `opentelemetry-bootstrap` command: diff --git a/content/en/docs/languages/python/getting-started.md b/content/en/docs/languages/python/getting-started.md index 28385e345a71..5030bfa94583 100644 --- a/content/en/docs/languages/python/getting-started.md +++ b/content/en/docs/languages/python/getting-started.md @@ -39,12 +39,16 @@ python3 -m venv venv source ./venv/bin/activate ``` -Now install Flask: +Now install Flask and Werkzeug: ```shell pip install 'flask<3' 'werkzeug<3' ``` +> **Note**: OpenTelemetry Python automatic instrumentation does not support +> Flask or Werkzeug 3.0+ at this time. See the troubleshooting section +> [No Data When Using Flask](/docs/languages/python/automatic#no-data-when-using-flask) + ### Create and launch an HTTP Server Create a file `app.py` and add the following code to it: