Skip to content

Commit

Permalink
Merge branch 'main' into urllib-none-status
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl authored Jan 27, 2022
2 parents ab16d06 + d55d1dc commit 5b88cd2
Show file tree
Hide file tree
Showing 102 changed files with 427 additions and 245 deletions.
3 changes: 3 additions & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
components:

instrumentation/opentelemetry-instrumentation-kafka-python:
- nozik

instrumentation/opentelemetry-instrumentation-pika:
- oxeye-nikolay
- nikosokolik
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'release/*'
pull_request:
env:
CORE_REPO_SHA: f0d559f5a8c40185e4cada6ed1914642b937f256
CORE_REPO_SHA: 15e457dd17bd1d9750a29fb0481c81e545e1bb71

jobs:
build:
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.8.0-0.27b0...HEAD)
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.9.0-0.28b0...HEAD)

## [1.9.0-0.28b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.9.0-0.28b0) - 2022-01-26


### Added

- `opentelemetry-instrumentation-pyramid` Pyramid: Conditionally create SERVER spans
([#869](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/869))
- `opentelemetry-instrumentation-grpc` added `trailing_metadata` to _OpenTelemetryServicerContext.
([#871](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/871))
- `opentelemetry-instrumentation-asgi` now returns a `traceresponse` response header.
([#817](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/817))
- `opentelemetry-instrumentation-kafka-python` added kafka-python module instrumentation.
([#814](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/814))
- `opentelemetry-instrumentation-falcon` Falcon: Conditionally create SERVER spans
([#867](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/867))

### Fixed

Expand All @@ -21,10 +30,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- `opentelemetry-instrumentation-flask` Flask: Conditionally create SERVER spans
([#828](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/828))
- `opentelemetry-instrumentation-celery` Celery: Support partial task time limit
([#846](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/846))

- `opentelemetry-instrumentation-asgi` ASGI: Conditionally create SERVER spans
([#843](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/843))

- `opentelemetry-instrumentation-django` Django: fix issue preventing detection of MIDDLEWARE_CLASSES

- `opentelemetry-instrumentation-sqlite3` Instrumentation now works with `dbapi2.connect`

## [1.8.0-0.27b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.8.0-0.27b0) - 2021-12-17

Expand Down
2 changes: 1 addition & 1 deletion _template/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
4 changes: 2 additions & 2 deletions eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sortfirst=
ext/*

[stable]
version=1.8.0
version=1.9.0

packages=
opentelemetry-sdk
Expand All @@ -34,7 +34,7 @@ packages=
opentelemetry-api

[prerelease]
version=0.27b0
version=0.28b0

packages=
all
Expand Down
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-datadog/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ install_requires =
ddtrace>=0.34.0,<0.47.0
opentelemetry-api ~= 1.3
opentelemetry-sdk ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-semantic-conventions == 0.28b0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-richconsole/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ install_requires =
rich>=10.0.0
opentelemetry-api ~= 1.3
opentelemetry-sdk ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-semantic-conventions == 0.28b0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-instrumentation == 0.27b0
opentelemetry-util-http == 0.27b0
opentelemetry-semantic-conventions == 0.28b0
opentelemetry-instrumentation == 0.28b0
opentelemetry-util-http == 0.28b0
wrapt >= 1.0.0, < 2.0.0

[options.packages.find]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
8 changes: 4 additions & 4 deletions instrumentation/opentelemetry-instrumentation-aiopg/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api ~= 1.3
opentelemetry-instrumentation-dbapi == 0.27b0
opentelemetry-instrumentation == 0.27b0
opentelemetry-instrumentation-dbapi == 0.28b0
opentelemetry-instrumentation == 0.28b0
wrapt >= 1.0.0, < 2.0.0

[options.extras_require]
test =
opentelemetry-test-utils == 0.27b0
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-test-utils == 0.28b0
opentelemetry-semantic-conventions == 0.28b0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
8 changes: 4 additions & 4 deletions instrumentation/opentelemetry-instrumentation-asgi/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-instrumentation == 0.27b0
opentelemetry-util-http == 0.27b0
opentelemetry-semantic-conventions == 0.28b0
opentelemetry-instrumentation == 0.28b0
opentelemetry-util-http == 0.28b0
asgiref ~= 3.0

[options.extras_require]
test =
opentelemetry-test-utils == 0.27b0
opentelemetry-test-utils == 0.28b0

[options.packages.find]
where = src
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-instrumentation == 0.27b0
opentelemetry-semantic-conventions == 0.28b0
opentelemetry-instrumentation == 0.28b0

[options.extras_require]
test =
opentelemetry-test-utils == 0.27b0
opentelemetry-test-utils == 0.28b0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ package_dir=
=src
packages=find_namespace:
install_requires =
opentelemetry-instrumentation == 0.27b0
opentelemetry-instrumentation == 0.28b0
opentelemetry-propagator-aws-xray == 1.0.1
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-semantic-conventions == 0.28b0

[options.extras_require]
test =
opentelemetry-test-utils == 0.27b0
opentelemetry-test-utils == 0.28b0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
6 changes: 3 additions & 3 deletions instrumentation/opentelemetry-instrumentation-boto/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-instrumentation == 0.27b0
opentelemetry-semantic-conventions == 0.28b0
opentelemetry-instrumentation == 0.28b0

[options.extras_require]
test =
moto~=2.0
opentelemetry-test-utils == 0.27b0
opentelemetry-test-utils == 0.28b0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-instrumentation == 0.27b0
opentelemetry-semantic-conventions == 0.28b0
opentelemetry-instrumentation == 0.28b0

[options.extras_require]
test =
moto[all] ~= 2.3.1
opentelemetry-test-utils == 0.27b0
moto[all] ~= 2.2.6
opentelemetry-test-utils == 0.28b0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-instrumentation == 0.27b0
opentelemetry-semantic-conventions == 0.28b0
opentelemetry-instrumentation == 0.28b0

[options.extras_require]
test =
pytest
opentelemetry-test-utils == 0.27b0
opentelemetry-test-utils == 0.28b0

[options.packages.find]
where = src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ def set_attributes_from_context(span, context):

# Skip `timelimit` if it is not set (it's default/unset value is a
# tuple or a list of `None` values
if key == "timelimit" and value in [(None, None), [None, None]]:
continue
if key == "timelimit":
if value in [(None, None), [None, None]]:
continue
if None in value:
value = ["" if tl is None else tl for tl in value]

# Skip `retries` if it's value is `0`
if key == "retries" and value == 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,46 @@ def test_set_attributes_not_recording(self):
self.assertFalse(mock_span.set_attribute.called)
self.assertFalse(mock_span.set_status.called)

def test_set_attributes_partial_timelimit_hard_limit(self):
# it should extract only relevant keys
context = {
"correlation_id": "44b7f305",
"delivery_info": {"eager": True},
"eta": "soon",
"expires": "later",
"hostname": "localhost",
"id": "44b7f305",
"reply_to": "44b7f305",
"retries": 4,
"timelimit": ("now", None),
"custom_meta": "custom_value",
"routing_key": "celery",
}
span = trace._Span("name", mock.Mock(spec=trace_api.SpanContext))
utils.set_attributes_from_context(span, context)
self.assertEqual(span.attributes.get("celery.timelimit"), ("now", ""))

def test_set_attributes_partial_timelimit_soft_limit(self):
# it should extract only relevant keys
context = {
"correlation_id": "44b7f305",
"delivery_info": {"eager": True},
"eta": "soon",
"expires": "later",
"hostname": "localhost",
"id": "44b7f305",
"reply_to": "44b7f305",
"retries": 4,
"timelimit": (None, "later"),
"custom_meta": "custom_value",
"routing_key": "celery",
}
span = trace._Span("name", mock.Mock(spec=trace_api.SpanContext))
utils.set_attributes_from_context(span, context)
self.assertEqual(
span.attributes.get("celery.timelimit"), ("", "later")
)

def test_set_attributes_from_context_empty_keys(self):
# it should not extract empty keys
context = {
Expand Down
6 changes: 3 additions & 3 deletions instrumentation/opentelemetry-instrumentation-dbapi/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ package_dir=
packages=find_namespace:
install_requires =
opentelemetry-api ~= 1.3
opentelemetry-semantic-conventions == 0.27b0
opentelemetry-instrumentation == 0.27b0
opentelemetry-semantic-conventions == 0.28b0
opentelemetry-instrumentation == 0.28b0
wrapt >= 1.0.0, < 2.0.0

[options.extras_require]
test =
opentelemetry-test-utils == 0.27b0
opentelemetry-test-utils == 0.28b0

[options.packages.find]
where = src
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.27b0"
__version__ = "0.28b0"

_instruments = tuple()
Loading

0 comments on commit 5b88cd2

Please sign in to comment.