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

Fix version of Flask dependency werkzeug #1980

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed

- Fix version of Flask dependency `werkzeug`
([#1980](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1980))

## Version 1.20.0/0.41b0 (2023-09-01)

### Fixed
Expand Down Expand Up @@ -352,7 +357,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `opentelemetry-instrumentation-sqlalchemy` Added span for the connection phase ([#1133](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1133))
- Add metric instrumentation in asgi
([#1197](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1197))
- Add metric instumentation for flask
- Add metric instrumentation for flask
([#1186](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1186))
- Add a test for asgi using NoOpTracerProvider
([#1367](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1367))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies = [
[project.optional-dependencies]
instruments = [
"flask >= 1.0, < 3.0",
"werkzeug < 3.0.0"
]
test = [
"opentelemetry-instrumentation-flask[instruments]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
).instrument()


Model intrumentation example:
Model instrumentation example:

.. code-block:: python

Expand Down Expand Up @@ -291,7 +291,7 @@ class descendent) is being instrumented with opentelemetry. Within a
SklearnInstrumentor(packages=packages).instrument()


Model intrumentation example:
Model instrumentation example:

.. code-block:: python

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
"library": "flask >= 1.0, < 3.0",
"instrumentation": "opentelemetry-instrumentation-flask==0.42b0.dev",
},
"werkzeug": {
"library": "werkzeug < 3.0.0",
"instrumentation": "opentelemetry-instrumentation-flask==0.42b0.dev",
},
"grpcio": {
"library": "grpcio ~= 1.27",
"instrumentation": "opentelemetry-instrumentation-grpc==0.42b0.dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ def set(self, carrier, key, value): # pylint: disable=no-self-use


class FuncSetter(Setter):
"""FuncSetter coverts a function into a valid Setter. Any function that can
set values in a carrier can be converted into a Setter by using FuncSetter.
This is useful when injecting trace context into non-dict objects such
HTTP Response objects for different framework.
"""FuncSetter converts a function into a valid Setter. Any function that
can set values in a carrier can be converted into a Setter by using
FuncSetter. This is useful when injecting trace context into non-dict
objects such HTTP Response objects for different framework.

For example, it can be used to create a setter for Falcon response object as:
For example, it can be used to create a setter for Falcon response object
as:

setter = FuncSetter(falcon.api.Response.append_header)

Expand Down