* Include propagator benchmarks + latest GH action
* When we moved the aws-xray propagator in #720, we needed to update the benchmark step of the workflow
* Additionally, the GH action has evolved since we added benchmarks so we should use the latest version
* Merge all parallel benchmarks after they complete
* Making span as internal in presence of a span in current context
* Updating changelog
* Removing extra print statements
* Resolving comments: Setting current context as parent in its presence
* Ignoring pylint check as django.conf.urls.url is removed in django 4.0
Django release notes: https://docs.djangoproject.com/en/4.0/releases/4.0/
* Removing changes in django files
* Fix sqlalchemy for postgres unix sockets
The following bit of replaced code contained a type inconsistency:
```py
attrs[SpanAttributes.NET_PEER_PORT] = int(data.get("port"))
```
`data.get` returns `Optional[str]` but `int(None)` throws a `TypeError`.
When using postgresql via unix socket `dsn` looks something like this:
```py
'user=postgres host=/tmp/socket dbname=postgres'
```
The `parse_dsn` function returns this:
```py
{'user': 'postgres', 'dbname': 'postgres', 'host': '/tmp/socket'}
```
* Update CHANGELOG
* Conditionally set net.transport for psql tcp/unix
* Use .value properties of enums
* Improve postgresql attribute detection from cursor
* Fix formatting
Co-authored-by: Matt Oberle <mattoberle@users.noreply.github.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
* Add support for generic OTEL_PYTHON_EXCLUDED_URLS variable
Use `OTEL_PYTHON_EXCLUDED_URLS` environment variable as a fallback of
`OTEL_PYTHON_{instrumentation}_EXCLUDED_URLS`.
* Only use generic variable when instrumentation-specific is not set
* Change wording on docs
Co-authored-by: Leighton Chen <lechen@microsoft.com>
* Add instrumentation for AWS Lambda Service - Implementation
* Lambda is CONSUMER SQS trace if 'Records' key in Lambda event
* More robust check of SQS by indexing and catching
* Explicitly catch errors we expect when determinig if SQS triggered Lambda
The `setuptools` package is not part of the stdlib, but often available
in the system environment (it is a buildtime requirement).
`pkg_resources` (a package provided by `setuptools`) is used as
a runtime requirement in `opentelemetry-instrumentation`. Explicitly
listing `setuptools` as a requirement protects instrumentation from
breaking with import errors in cases where `setuptools` is not available
system-wide.
For example:
* A multi-stage Docker build where the final image does not contain
buildtime requirements.
* A build system that packages the runtime dependencies into a single
binary.
This commit pins `setuptools >= 16.0` because that is the first release
that included all 5 imports instrumentation currently relies on.
Co-authored-by: Matt Oberle <mattoberle@users.noreply.github.com>
* Refactor code using pyupgrade for Python 3.6
This diff is the result of applying the following command to the
project:
```shell
find . -type f -name "*.py" -exec pyupgrade --py36-plus '{}' +
```
* Simplify yield from
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>