* opentelemetry-instrumentation: teach opentelemetry-instrument about gevent
Introduce
OTEL_PYTHON_AUTO_INSTRUMENTATION_EXPERIMENTAL_GEVENT_PATCH=patch_all
environment variable that calls gevent monkey module patch_all method
before starting up the distro and sdk. The environment variable should
useful also for apps instrumented via the opentelemetry-operator.
The flag removes the following warning (and hang) when running locust:
$ opentelemetry-instrument locust
/lib/python3.10/site-packages/locust/__init__.py:16: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['urllib3.util (/lib/python3.10/site-packages/urllib3/util/__init__.py)', 'urllib3.util.ssl_ (/lib/python3.10/site-packages/urllib3/util/ssl_.py)'].
monkey.patch_all()
* Update CHANGELOG
* Please pylint
* Apply suggestions from code review
Co-authored-by: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com>
* Move environment variable to proper module
---------
Co-authored-by: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com>
* Allow reraising the root exception if instrumentation fails
I would rather completely fail startup in my services if instrumentation fails for whatever reason instead of just logging an exception and continuing.
Use case:
from opentelemetry import autoinstrumentation
autoinstrumentation.initialize(swallow_exceptions=False)
* Fix lint
* Type hinting, re-raise original exception
* One more type hint to indicate None return
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* ISSUE-3317: Remove maximum version constraint on starlette, by fixing unit tests. Fixed some warnings in unit tests.
* Updae changelog
* Implement code review remarks: update starlette dependencies in bootstrap/test-requirements. Use setUp/tearDown iso decorator on test class
* Increase minimal version of starlette to 0.37.2 to have functional 'oldest' tests.
* add uv.lock
* Revert "add uv.lock"
This reverts commit 08df2bee1e.
* Prevent massive changes of uv.lock due to newer uv which adds upload-time keyword
* Update test-requirements.in file of starlette instrumentation
* fixes
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* fix tests
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* increase delta
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* using same delta as fastapi
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* commit uv.lock back
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* Update CHANGELOG.md
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Update CHANGELOG.md
---------
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* catch ModuleNotFoundError when the library is not installed and prevent exception from bubbling up
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* cleanup
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* remove dup test
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* Update CHANGELOG.md
---------
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* Update version to 1.33.0.dev/0.54b0.dev
* Point CORE_REPO_SHA to opentelemetrybot/update-version-to-1.33.0.dev-0.54b0.dev
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Handle empty strings
Safer check for a trailing semicolon that could handle
empty strings as well.
* Updated CHANGELOG.md
* Test for empty SQL strings in sqlcommenter
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* scripts/generate_instrumentation_bootstrap: don't force genai instrumentations versions
Since genai instrumentations are released on their own we cannot have a
fixed required version on this side.
While at it add vertexai to the list of excluded packages since:
- it has not been released yet
- the name is already claimed by openllmetry
* Regenerate bootstrap_gen
* Please spellcheck
---------
Co-authored-by: Leighton Chen <lechen@microsoft.com>
* opentelemetry-instrumentation-falcon: expand supported version to v4
Falcon v4 has a mostly identical interface to v3, and is proved to be fully compatible with `opentelemetry-instrumentation-falcon`. Loose the version check to `<5.0.0` to avoid false `DependencyConflict` alarm.
* opentelemetry-instrumentation-falcon: generate tests for v4
* opentelemetry-instrumentation-falcon: prepare tests for v4
* opentelemetry-instrumentation-falcon: add test preset for `~=3.1.2`
* docs: add changelog for Falcon v4 instrumentation
* opentelemetry-instrumentation-falcon: adjust pylint mark for v4
* _has_fixed_http_target property
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* move changelog to the correct section
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* fix test and bootstrap_gen
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
---------
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: emdneto <9735060+emdneto@users.noreply.github.com>
Add "Repository" label to project urls pointing to the
opentelemetry-python repo root url.
Having within project urls one entry with the same value for all
packages released by the project will help tools for automatic
dependency management to suggest coherent upgrades for related packages.
To match the instrumentations.
Will hopefully fix pip not able to handle the situation:
opentelemetry-instrumentation 0.49b0 depends on opentelemetry-semantic-conventions>=0.48b0
opentelemetry-instrumentation-dbapi 0.49b0 depends on opentelemetry-semantic-conventions==0.49b0