You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Issue #, if available:*
Some customers are using gevent in their Python application with
opentelemetry, and this causes the application to crash due to `maximum
recursion depth exceeded` error. This is because `gevent` uses a
specific version of the `ssl` module and runs `monkey.patch_all()` to
patch the ssl module to the required version.
The `monkey` command patches already existing modules to the required
version, which may cause problems if there are other applications
already using the module before monkey is ran.
Because Opentelemetry is also using the `ssl` module , it creates a
conflict and causes the application to crash. The recommended solution
is to run `moneky.patch_all()` in opentelemetry beforehand so that such
conflicts do not occur.
*Description of changes:*
The issue experienced by customers is specifically due to the `ssl`
module, therefore, we can run monkey.patch_ssl() command to only monkey
the `ssl` module and reduce the scope. The distro will check if the
customer application has the `gevent` module installed, and if so, run
the `monkey.patch_ssl()`.
*Test*
Built opentelemetry docker image with the change, modified the operator
to install opentelemetry on sample python application with the image.
Checked that the sample application has opentelemetry running and
doesn't crash when APIs are called.
Test run:
https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/9813426624
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
0 commit comments