opentelemetry-instrumentaiton-asgi does not contain an instrumentor for
asgiref. Instead, it implements an ASGI middleware that other
instrumentors import and use. As such, other instrumentors can take a
dependency on this package without asgiref being installed locally. This
commit adds `asgiref` as a dependency to the
opentelemetry-instrumentation-asgi package so the middleware can
function properly when used by another instrumentation.
* botocore: Add dynamodb extension
* extract addtional DynamoDB specific attributes according to the spec
* move DynamoDB tests to separate test module
* changelog
* add license info
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* Bugfix the porperties.headers in the pika instrumentation, and write tests that ensure it
* Ensure that BasicProperties is called with headers={}
* Update CHANGELOG.md
* Update the span kind from SERVER/CLIENT to PRODUCER/CONSUMER
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* Implement checking for suppression key
Add test for suppression key with pymongo
changelog update
* Linting
* pylint
* Bad reformat
* Update changelog with PR
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Now that SDK does not depend on opentelemetry-instrumentation
anymore and opentelemetry-instrumentation has actual build time
dependencies on the contrib repo, it makes maintanence a lot
easier if we move opentelemetry-instrumentation to contrib repo.
opentelemetry-distro depends on opentelemetry-instrumentation
and is being moved as well. Neither of the two packages are
really part of "core" Otel python anyway.
* Fix typo: _DEFALT_OP_NAME
* Extract ES document ID from URL, put in attributes
Elasticsearch creates URLs for index() and delete() before they hit
perform_request(). This means there would be many unique span names
containing unique document IDs, of the form
'Elasticsearch/indexname/_doc/documentid'.
This extracts the document ID from the URL and replaces it with ':id',
then puts it in the span's attributes.
* Add TODO comment with link to issue
* Add CHANGELOG entry
* Don't use custom doc types, deprecated in ES 7
* Update tests to match instrumentation
* respect provided tracer provider when instrumenting sqlalchemy
This change updates the SQLALchemyInstrumentor to respect the tracer
provider that is passed in through the kwargs when patching the
`create_engine` functionality provided by SQLAlchemy. Previously, it
would default to the global tracer provider.
* feedback: pass in tracer_provider directly rather than kwargs
* feedback: update changelog
* build: lint
* Expand allowed versions
The Jinja2 API hasn't changed the functions that have been wrapped in at least 8 years.
The version supported should be much more broad.
* don't include 4+
* Update changelog
* Fix test that depends on lru_cache now
* tox -e generate
* Make test setup backwards compatible
* Update for code review feedback
* Disable linting check
* Fix black formatting issue
* Update readme from tox -e generate
* Update core repo sha
Co-authored-by: alrex <aboten@lightstep.com>
Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Owais Lone <owais@users.noreply.github.com>
* botocore: Introduce instrumentation extensions
* add extensions that are invoked before and after an AWS SDK
service call to enrich the span with service specific request and
response attirbutes
* move SQS specific parts to a separate extension
* changelog
Co-authored-by: Owais Lone <owais@users.noreply.github.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
* Remove unneded CI steps
These were not really needed and got in by mistake.
* Fix broken mssql integration tests
We were giving mssql server 10 seconds to start before creating the test
database. It now takes Github CI more than 10 seconds to start the mssql
server. Instead of increasing the leeway with guesses, this commit moves
the creation of test database from docker compose to the python test suite.
This allows the docker image to come up first and then create the DB
inside the test suite with proper retry mechanism that is already in
place.
* Add a default context when one does not exist
* Split the if to fit C0325: Unnecessary parens after 'not' keyword
* Split the context retrieving according to the function
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>