Skip to content

Commit 6e8b143

Browse files
authored
Try to really clarify that you need flask and wekzeug < 3 (#4034)
1 parent 0b1a80f commit 6e8b143

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

content/en/docs/kubernetes/operator/automatic.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 11
55
description:
66
An implementation of auto-instrumentation using the OpenTelemetry Operator.
77
# prettier-ignore
8-
cSpell:ignore: autoinstrumentation GRPCNETCLIENT k8sattributesprocessor otelinst otlpreceiver PTRACE REDISCALA
8+
cSpell:ignore: autoinstrumentation GRPCNETCLIENT k8sattributesprocessor otelinst otlpreceiver PTRACE REDISCALA Werkzeug
99
---
1010

1111
The OpenTelemetry Operator supports injecting and configuring
@@ -317,6 +317,10 @@ spec:
317317
EOF
318318
```
319319

320+
> **Note**: OpenTelemetry Python automatic instrumentation does not support
321+
> Flask or Werkzeug 3.0+ at this time. See the troubleshooting section
322+
> [No Data When Using Flask](/docs/languages/python/automatic#no-data-when-using-flask)
323+
320324
By default, the `Instrumentation` resource that auto-instruments Python services
321325
uses `otlp` with the `http/protobuf` protocol (gRPC is not supported at this
322326
time). This means that the configured endpoint must be able to receive OTLP over

content/en/docs/languages/python/automatic/_index.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: Automatic Instrumentation
33
linkTitle: Automatic
44
weight: 30
5-
cSpell:ignore: devel distro mkdir myapp uninstrumented virtualenv
5+
# prettier-ignore
6+
cSpell:ignore: devel distro mkdir myapp pyproject uninstrumented virtualenv Werkzeug
67
---
78

89
Automatic instrumentation with Python uses a Python agent that can be attached
@@ -74,6 +75,19 @@ You can find the full list
7475

7576
## Troubleshooting
7677

78+
### No data when using Flask
79+
80+
Using OpenTelemetry with Flask requires both Flask and Werkzeug versions as <
81+
3.0. Because Flask 2.x does not specify Werkzeug as < 3.0, conflicts can arise.
82+
83+
Ensure your Flask version is < 3.x, and specify the Werkzeug version explicitly
84+
as < 3.0. For example, in a `pyproject.toml` file:
85+
86+
```console
87+
flask = "2.2.2"
88+
Werkzeug = "2.2.2"
89+
```
90+
7791
### Python package installation failure
7892

7993
The Python package installs require `gcc` and `gcc-c++`, which you may need to

content/en/docs/languages/python/automatic/example.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ pip install 'flask<3' 'werkzeug<3' requests
105105
```
106106

107107
> **Note**: OpenTelemetry Python automatic instrumentation does not support
108-
> Flask or Werkzeug 3.0+ at this time.
108+
> Flask or Werkzeug 3.0+ at this time. See the troubleshooting section
109+
> [No Data When Using Flask](/docs/languages/python/automatic#no-data-when-using-flask)
109110
110111
Run the `opentelemetry-bootstrap` command:
111112

content/en/docs/languages/python/getting-started.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,16 @@ python3 -m venv venv
3939
source ./venv/bin/activate
4040
```
4141

42-
Now install Flask:
42+
Now install Flask and Werkzeug:
4343

4444
```shell
4545
pip install 'flask<3' 'werkzeug<3'
4646
```
4747

48+
> **Note**: OpenTelemetry Python automatic instrumentation does not support
49+
> Flask or Werkzeug 3.0+ at this time. See the troubleshooting section
50+
> [No Data When Using Flask](/docs/languages/python/automatic#no-data-when-using-flask)
51+
4852
### Create and launch an HTTP Server
4953

5054
Create a file `app.py` and add the following code to it:

0 commit comments

Comments
 (0)