File tree 4 files changed +27
-4
lines changed
4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ weight: 11
5
5
description :
6
6
An implementation of auto-instrumentation using the OpenTelemetry Operator.
7
7
# prettier-ignore
8
- cSpell:ignore : autoinstrumentation GRPCNETCLIENT k8sattributesprocessor otelinst otlpreceiver PTRACE REDISCALA
8
+ cSpell:ignore : autoinstrumentation GRPCNETCLIENT k8sattributesprocessor otelinst otlpreceiver PTRACE REDISCALA Werkzeug
9
9
---
10
10
11
11
The OpenTelemetry Operator supports injecting and configuring
@@ -317,6 +317,10 @@ spec:
317
317
EOF
318
318
```
319
319
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
+
320
324
By default, the ` Instrumentation ` resource that auto-instruments Python services
321
325
uses ` otlp ` with the ` http/protobuf ` protocol (gRPC is not supported at this
322
326
time). This means that the configured endpoint must be able to receive OTLP over
Original file line number Diff line number Diff line change 2
2
title : Automatic Instrumentation
3
3
linkTitle : Automatic
4
4
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
6
7
---
7
8
8
9
Automatic instrumentation with Python uses a Python agent that can be attached
@@ -74,6 +75,19 @@ You can find the full list
74
75
75
76
## Troubleshooting
76
77
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
+
77
91
### Python package installation failure
78
92
79
93
The Python package installs require ` gcc ` and ` gcc-c++ ` , which you may need to
Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ pip install 'flask<3' 'werkzeug<3' requests
105
105
```
106
106
107
107
> ** 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 )
109
110
110
111
Run the ` opentelemetry-bootstrap ` command:
111
112
Original file line number Diff line number Diff line change @@ -39,12 +39,16 @@ python3 -m venv venv
39
39
source ./venv/bin/activate
40
40
```
41
41
42
- Now install Flask:
42
+ Now install Flask and Werkzeug :
43
43
44
44
``` shell
45
45
pip install ' flask<3' ' werkzeug<3'
46
46
```
47
47
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
+
48
52
### Create and launch an HTTP Server
49
53
50
54
Create a file ` app.py ` and add the following code to it:
You can’t perform that action at this time.
0 commit comments