All instrumentations read most env vars today at module level. This has
a few disadvantages.
- harder to test.
- code executed on import even if instrumentation is not used.
- forces to use global vars.
This commit fixes the Falcon instrumentation to handle env vars locally
during instrumentor initialization and considerably simplifies testing.
Other instrumentations should receive similar treatment.
The test was actually generating 2 spans but on very fast systems we
only saw one as the test ran faster than the message would travel
through the broker, trigger a task and generate 2nd span.
Switched from .delay() to .apply() so only one span is generated which
is enough for the test in question.
directory
This file lists down all instrumentations and the packages+versions they
support. This is helpful to find out at a glance what is exactly
supported.
Co-authored-by: alrex <aboten@lightstep.com>
* Run tests on Windows in Github Actions
* core sha update
* format code
* fix ci yaml
* rebase
* lint
* Try without win+py3.6 fix
* Try without win+py3.6 fix
* Improve test reliability
Update some tests to use more deterministic methods of testing in memory
spans. This helps the core repo pass tests after adding Windows to CI
matrix.
It seems the same in memory span exporter was being reused by multiple
tests. This change _should_ create a new instance of memeory exporter
per test/function.
Fixes#2067
* Allow instrumentation of newer FastAPI versions
Since the introduction of the `_instruments` runtime checks in #475, the
FastAPI instrumentation has stopped working for versions >= `0.59.0`.
However the current test suite passes even for the latest released
version at the moment (`0.67.0`).
It seems this isn't related to a limitation in the instrumentation code,
but actually because of it being created when `0.58` was the latest version:
7bec76a220.
* Add changelog entry
Co-authored-by: Owais Lone <owais@users.noreply.github.com>
* Fix tox lint command
- Move apt-get install command to github actions to run on an ubuntu
system only. This keeps tox.ini cross-platform and enabled to run on
non-ubuntu systems locally.
- Add `-y` flag to apt-get install command so it does not wait for
configuration on CI.
* Downgrade pylint to 2.9.x
* Add pip cache to github actions cache
* Worklow to publish a package from a CODEOWNER tag
* Prevent main script from release >=1.0 packages
* Fixes to build package workflow and script
* Better naming and remove redundant ls flag
* Add err msg for missing setup.py ls match
* Use lowercase for all non env variable vars
* Fix RequestsInstrumentor for custom transport adapters
remove dead/leftover code from an early metrics implementation which
tried to access the raw.version attribute on the response object.
The 'version' attribute might not be present in every case, especially
when custom transport adapters are used.