Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to really clarify that you need flask and wekzeug < 3 #4034

Merged
merged 4 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions content/en/docs/kubernetes/operator/automatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@
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)

Check warning on line 321 in content/en/docs/kubernetes/operator/automatic.md

View workflow job for this annotation

GitHub Actions / SPELLING check

Unknown word (Werkzeug)

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
Expand Down
11 changes: 11 additions & 0 deletions content/en/docs/languages/python/automatic/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@

## 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.

Check warning on line 79 in content/en/docs/languages/python/automatic/_index.md

View workflow job for this annotation

GitHub Actions / SPELLING check

Unknown word (Werkzeug)

Check warning on line 79 in content/en/docs/languages/python/automatic/_index.md

View workflow job for this annotation

GitHub Actions / SPELLING check

Unknown word (Werkzeug)

Ensure your Flask version is < 3.x, and specify the Werkzeug version explicitly as < 3.0. For example, in a `pyproject.toml` file:

Check warning on line 81 in content/en/docs/languages/python/automatic/_index.md

View workflow job for this annotation

GitHub Actions / SPELLING check

Unknown word (Werkzeug)

Check warning on line 81 in content/en/docs/languages/python/automatic/_index.md

View workflow job for this annotation

GitHub Actions / SPELLING check

Unknown word (pyproject)

```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
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/languages/python/automatic/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ 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:

Expand Down
5 changes: 4 additions & 1 deletion content/en/docs/languages/python/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ 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:
Expand Down
Loading