The `sqlalchemy` instrumentation uses the `packaging` library to parse
the `sqlalchemy` SemVer.
`packaging` is not part of the standard library and should be included
in the `setup.cfg` file to avoid:
```
ModuleNotFoundError: No module named 'packaging'
```
Co-authored-by: Matt Oberle <mattoberle@users.noreply.github.com>
Co-authored-by: Owais Lone <owais@users.noreply.github.com>
* Added initial code
* Add all needed spans, and add support of instrumentation and uninstrumentation
* Added tests. Ready for PR
* Rename RequestsInstrumentation to RequestsInstrumentor to follow conventions
* Add suppress_instrumentation functionality
* Fix suppress_instrumentation functionality
* Fix CR comments and lint test failures
* Add usage of wrapt according to CR comments
* Fix according to CR Comments
* Move the tracer to be an attribute of the instrumentor instead of the channel
* Fix Tests
* Update Changelog and fix failing test
* update code using tox -e generate
* Update the name of the variable to store the tracer provider.
* Update the core repo hash in the workflow
* Update the core repo hash in the workflow
Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Owais Lone <owais@users.noreply.github.com>
* Remove duplicate HTTP_HOST
* Set http.client_ip instead of net.peer.ip
Tornado sets remote_ip to the value of X-Forwarded-For or X-Real-IP if
the 'xheaders' setting is set.
* Add a "handler" attribute, with full class name
The spec has a 'http.route' which unfortunately seems difficult to get
at. However the full class name is readily available and most helpful.
* Add net.peer.ip from _orig_remote_ip
* Address review comments
- Don't set NET_PEER_IP if '_orig_remote_ip' is not set
- Add a comment about the difference between the attributes
* Make "handler" attribute into "tornado.handler"
* Add CHANGELOG entry
* Add test with X-Forwarded-For
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
* botocore hooks
* a single hook for all aws services
* fix test
* rename get_item_attributes variable to put_item_attributes
* rename tests
* delete redundant line
* Add a rich console exporter
* be more lenient on missing parent spans
* Apply suggestions from code review
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
* run black over source
* patch change by hand
* update changelog
* remove defunct statement
* Clarify the simple/batch span processor
* fix f-strings that dont have formatting
* clarify span usage and update classifiers
* make child_to_tree a private function and rename some variables
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
Co-authored-by: alrex <aboten@lightstep.com>
* Urllib3: extend request hook with request body and headers
* Change GET to POST in test_extended_request_hook
* added changelog entry
* update ExtendedReqeustHookT
* adding up to date generated code
* replace _RequestHookT with _ExtendedRequestHookT
* updated Changelog
Co-authored-by: Ran Nozik <ran@heliosphere.io>
* Botocore: Fix span inject for lambda invoke
* for lambda invoke span injection happend to early which resulted in the botocore
span being injected instead of the actual botocore span
* changelog
Co-authored-by: alrex <aboten@lightstep.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* README 1.0 release checklist + what is a CODEOWNER
* Do not required SLA for responding to asks
* Easy changes to address reviewer comments
* Introduce on Slack at least not SIG meeting
* Give guidance when a CODEOWNER wants to leave a project
* Update README.md
Take suggestion package "MUST" wording.
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* Update README.md
Take suggestion on CODEOWNER requirement wording.
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* Apply suggestions from code review
Take more suggestions on checklist list requirements.
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* Update README.md
Take suggestion on MUST requirement for documentation.
* Add back missing bullet point
* Do not say perpetually 1.0 instead say up to maintainers
* Make it explicity CODEOWNER is for 1 file
* Make OTel Community membership a requirement because the action we use requires it
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
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