1387 Commits

Author SHA1 Message Date
c962da908c Merge parallel benchmarks + include propagator + latest GH action (#838)
* 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
2021-12-23 14:06:47 +05:30
9219677adb Fix CHANGELOG (#839) 2021-12-21 23:00:31 +05:30
30d0c2ea90 Conditionally create server spans for flask (#828)
* 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
2021-12-20 11:48:59 +00:00
0786aa49ad updating changelogs and version to 1.8.0-0.27b0 (#835) v0.27b0 2021-12-17 22:34:57 +05:30
07f81461df lambda instrumentation - support for flush timeout (#825)
* lambda instrumentation - support for flush timeout

* Update instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>

* Update instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>

* fixing lint

* fixing django lint

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
2021-12-14 18:06:36 +05:30
444e0a1312 Remove direct Zoom link (#816)
Zoom links are randomized and in the calendar. Removed the existing link.
2021-11-23 22:28:08 +05:30
f0ac738ee1 Fix a logic bug on parentless spans (#782)
* Fix a logic bug on parentless spans

* Add a test

* Simplify logic

* Add changelog entry

* Update tox configuration

* Rename the fixtures to keep pylint happy
2021-11-19 17:25:33 +05:30
e6dff7e5d1 Add support instrumentation for Tornado 5.1.1 (#812)
* Add support instrumentation for Tornado 5.1.1

* update CHANGELOG.md
2021-11-17 17:34:25 +00:00
a9507b3d1d updating changelogs and version to 1.7.1-0.26b1 (#809) v0.26b1 2021-11-12 01:30:47 +05:30
7cf29b4000 Rename opentelemetry-test to opentelemetry-test-utils (#807)
* updating changelogs and version to 1.7.0-0.26b0

* Rename opentelemetry-test to opentelemetry-test-utils
2021-11-11 19:11:12 +00:00
e621d637e9 updating changelogs and version to 1.7.0-0.26b0 (#805) 2021-11-11 18:55:06 +00:00
43bc7809e4 Fixed opentelemetry-test package subdir name (#804) 2021-11-11 07:48:51 -06:00
055a50c798 botocore: Add Lambda extension (#760)
* botocore: Add Lambda extension

* add extension to add additional attributes for lambda invoke
  calls
* move lambda specific tests to separate module

* changelog

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Owais Lone <owais@users.noreply.github.com>
2021-11-11 13:01:16 +00:00
10d8e26a78 Fix sqlalchemy for postgres Unix sockets (#761)
* 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>
2021-11-11 12:35:55 +00:00
2dd9bd12ea Pass in auto-instrumentation version to configurator (#783)
* version

* Update CHANGELOG.md

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2021-11-11 11:48:46 +00:00
5f1845d3c6 Use augmented assignment statements (#797)
Fixes #796
2021-11-10 23:42:44 +00:00
d4ad8f57be Add support for generic OTEL_PYTHON_EXCLUDED_URLS variable (#790)
* 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>
2021-11-10 22:44:02 +00:00
2f9bcb230a Update core opentelemetry-tests subdirectory (#801) 2021-11-11 03:38:48 +05:30
3137c1fa41 Upgrade black (#802) 2021-11-10 20:57:01 +00:00
f4d09f956a Remove special support for celery from sitecustomize (#799)
This is not required anymore after merging https://github.com/open-telemetry/opentelemetry-python/pull/2242
2021-11-10 17:17:36 +05:30
760673fc45 pymongo instrumentation hooks (#793)
* pymongo instrumentation hooks

* update PR number
2021-11-09 09:14:55 -06:00
59933299ef Use __name__ instead of __file__ (#794)
Fixes #787
2021-11-09 04:59:03 +05:30
0c083ff6ea Support PyMySQL 1.x series (#792)
Fixes #791
2021-11-06 17:18:50 +05:30
671aea32f9 Add instrumentation for AWS Lambda Service - Implementation (Part 2/2) (#777)
* 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
2021-11-01 20:02:58 +05:30
9dc3bbb8dc django: Fix instrumentation and tests for all Django major versions (#780) 2021-10-28 13:52:36 -07:00
6912c3963d Add setuptools instrumentation install requirement (#781)
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>
2021-10-28 04:23:10 +05:30
335a14c682 adding CI testing for python 3.10 (#742) 2021-10-26 21:43:23 +00:00
76a5cda307 Don't set STATUS on SpanKind SERVER for 4XX status (#776) 2021-10-26 11:44:44 -07:00
dbc6a86bf1 Add instrumentation for AWS Lambda Service - pkg metadata files (Part 1/2) (#739)
* Add instrumentation for AWS Lambda Service

* Add AWS Lambda package metadata files
2021-10-26 20:58:12 +05:30
286f26bbed Pika - add publish_hook and consume_hook (#763) 2021-10-26 11:23:11 +02:00
4b9b6dc18e django: Fix carrier usage on ASGI requests (#767)
* django: Fix carrier usage on ASGI requests

For ASGI requests, we must use `request.scope` instead of
`request.META`. This is because `ASGIGetter` retrieves the `headers` key
from the carrier [0], which is only present in `request.scope`.

[0] https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py#L133

* Add unit tests
2021-10-25 16:14:47 +00:00
3a78439307 falcon: Drop support for Python 3.4 (#774)
Remove unwanted support for Python versions <3.6.
This integration mistakenly lists Python 3.4 support, because it was
merged in
https://github.com/open-telemetry/opentelemetry-python/pull/1039,
after the merge of
https://github.com/open-telemetry/opentelemetry-python/pull/1099, so the
latter didn't consider `falcon`.

Python 3.4 is broken nevertheless, as this integration already includes
f-strings and other `opentelemetry` dependencies, which require Python 3.6.

Fixes #772.
2021-10-25 20:55:09 +05:30
07c52aad38 Refactor code using pyupgrade for Python 3.6 (#770)
* 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
2021-10-24 07:04:06 +05:30
3ff06da2fb Bugfix: Pika basicConsume context propagation (#766) 2021-10-21 10:50:52 -07:00
ae7a415f47 Consolidate instrumentation documentation in docstrings (#754) 2021-10-21 09:54:30 -07:00
3049b4bfc5 Added asgiref depedency to opentelemetry-instrumentation-asgi (#765)
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.
2021-10-21 02:10:03 +05:30
c24c77dd3a Bugfix/instrument basic publish in pika (#759) 2021-10-19 14:02:24 -07:00
433b8565da opentelemetry-instrument: Fix documented options (#747) 2021-10-19 19:18:11 +00:00
d158a5f3b8 Prepare release v1.6.2 and 0.25b2 (#762) v0.25b2 2021-10-20 00:00:28 +05:30
27e58e5e3a Re-enable CI generate check and generate bootstrap_gen (#757)
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2021-10-19 16:38:16 +00:00
22b069baae default value is invalid, was renamed (#755)
* default value is invalid, was renamed

* Update CHANGELOG.md

Co-authored-by: Owais Lone <owais@users.noreply.github.com>
2021-10-19 15:55:41 +00:00
f13b339a91 Check Request ID format on S3 call (#750) 2021-10-19 07:18:58 +00:00
9e57fbad8e Release AWS Python SDK Extension as 2.0.1 and AWS Propagator as 1.0.1 (#753) opentelemetry-propagator-aws-xray==1.0.1 opentelemetry-sdk-extension-aws==2.0.1 2021-10-18 14:51:52 -07:00
f3dde6b628 updating changelogs and version to 1.6.1-0.25b1 (#751) 0.25b1 2021-10-18 13:04:04 -07:00
c6ec4866ea Remove unnecessary deps on test pkgs (#752) 2021-10-18 19:39:27 +00:00
3058281f5e botocore: Add DynamoDB extension (#735)
* 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>
2021-10-18 11:53:06 +02:00
bf41b2e33f Bugfix/set default headers for properties in pika (#740)
* 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>
2021-10-17 17:38:00 +05:30
4e3aaa51ec Fixed changelog (#746) 2021-10-15 19:02:33 +00:00
8ad84a56d0 Remove HTTPClientInstrumentor instrumentation entry point (#745)
Fixes #744

This is a temporary hotfix for the issue linked above. We'll need to
figure out a proper fix later.
2021-10-16 00:12:52 +05:30
f7256f5236 Fix build script to not release stable pkgs (#743) 2021-10-15 13:54:56 +02:00