Skip to content

Commit

Permalink
Merge branch 'main' into feature/link-validation-check#1514
Browse files Browse the repository at this point in the history
  • Loading branch information
shalevr authored Sep 6, 2023
2 parents 8525e5a + 54be160 commit 14a4452
Show file tree
Hide file tree
Showing 110 changed files with 395 additions and 294 deletions.
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: c41b6bf29e9486a71ba1c40cd0ea35a03b2f7489
CORE_REPO_SHA: 0ef76a5cc39626f783416ca75e43556e2bb2739d

jobs:
build:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## Version 1.20.0/0.41b0 (2023-09-01)

### Fixed

- `opentelemetry-instrumentation-asgi` Fix UnboundLocalError local variable 'start' referenced before assignment
([#1889](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1889))
- Fixed union typing error not compatible with Python 3.7 introduced in `opentelemetry-util-http`, fix tests introduced by patch related to sanitize method for wsgi
([#1913](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1913))
- `opentelemetry-instrumentation-celery` Unwrap Celery's `ExceptionInfo` errors and report the actual exception that was raised. ([#1863](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1863))

### Added

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.41b0.dev"
__version__ = "0.42b0.dev"
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.20.0.dev
version=1.21.0.dev

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

[prerelease]
version=0.41b0.dev
version=0.42b0.dev

packages=
all
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.41b0.dev"
__version__ = "0.42b0.dev"
2 changes: 1 addition & 1 deletion exporter/opentelemetry-exporter-richconsole/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-sdk ~= 1.12",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
"rich>=10.0.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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ instruments = [
]
test = [
"opentelemetry-instrumentation-aio-pika[instruments]",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
"pytest",
"wrapt >= 1.0.0, < 2.0.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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-util-http == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
"opentelemetry-util-http == 0.42b0.dev",
"wrapt >= 1.0.0, < 2.0.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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-instrumentation-dbapi == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-instrumentation-dbapi == 0.42b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]

Expand All @@ -37,8 +37,8 @@ instruments = [
]
test = [
"opentelemetry-instrumentation-aiopg[instruments]",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
]

[project.entry-points.opentelemetry_instrumentor]
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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ classifiers = [
dependencies = [
"asgiref ~= 3.0",
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-util-http == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
"opentelemetry-util-http == 0.42b0.dev",
]

[project.optional-dependencies]
Expand All @@ -38,7 +38,7 @@ instruments = [
]
test = [
"opentelemetry-instrumentation-asgi[instruments]",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
]

[project.urls]
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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
]

[project.optional-dependencies]
Expand All @@ -36,7 +36,7 @@ instruments = [
]
test = [
"opentelemetry-instrumentation-asyncpg[instruments]",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
]

[project.entry-points.opentelemetry_instrumentor]
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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ classifiers = [
"Programming Language :: Python :: 3.8",
]
dependencies = [
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-propagator-aws-xray == 1.0.1",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
]

[project.optional-dependencies]
instruments = []
test = [
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
]

[project.urls]
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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
]

[project.optional-dependencies]
Expand All @@ -38,7 +38,7 @@ test = [
"opentelemetry-instrumentation-boto[instruments]",
"markupsafe==2.0.1",
"moto~=2.0",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
]

[project.entry-points.opentelemetry_instrumentor]
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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]

Expand All @@ -37,7 +37,7 @@ instruments = [
]
test = [
"opentelemetry-instrumentation-boto3sqs[instruments]",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
]

[project.entry-points.opentelemetry_instrumentor]
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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
"opentelemetry-propagator-aws-xray == 1.0.1",
]

Expand All @@ -39,7 +39,7 @@ test = [
"opentelemetry-instrumentation-botocore[instruments]",
"markupsafe==2.0.1",
"moto[all] ~= 2.2.6",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
]

[project.entry-points.opentelemetry_instrumentor]
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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]

Expand All @@ -38,7 +38,7 @@ instruments = [
]
test = [
"opentelemetry-instrumentation-cassandra[instruments]",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
]

[project.entry-points.opentelemetry_instrumentor]
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.41b0.dev"
__version__ = "0.42b0.dev"
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-instrumentation == 0.41b0.dev",
"opentelemetry-semantic-conventions == 0.41b0.dev",
"opentelemetry-instrumentation == 0.42b0.dev",
"opentelemetry-semantic-conventions == 0.42b0.dev",
]

[project.optional-dependencies]
Expand All @@ -36,7 +36,7 @@ instruments = [
]
test = [
"opentelemetry-instrumentation-celery[instruments]",
"opentelemetry-test-utils == 0.41b0.dev",
"opentelemetry-test-utils == 0.42b0.dev",
"pytest",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def add(x, y):
from timeit import default_timer
from typing import Collection, Iterable

from billiard.einfo import ExceptionInfo
from celery import signals # pylint: disable=no-name-in-module

from opentelemetry import trace
Expand All @@ -75,6 +76,13 @@ def add(x, y):
from opentelemetry.propagators.textmap import Getter
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.trace.status import Status, StatusCode
from billiard import VERSION


if VERSION >= (4, 0, 1):
from billiard.einfo import ExceptionWithTraceback
else:
ExceptionWithTraceback = None

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -271,6 +279,18 @@ def _trace_failure(*args, **kwargs):
return

if ex is not None:
# Unwrap the actual exception wrapped by billiard's
# `ExceptionInfo` and `ExceptionWithTraceback`.
if isinstance(ex, ExceptionInfo) and ex.exception is not None:
ex = ex.exception

if (
ExceptionWithTraceback is not None
and isinstance(ex, ExceptionWithTraceback)
and ex.exc is not None
):
ex = ex.exc

status_kwargs["description"] = str(ex)
span.record_exception(ex)
span.set_status(Status(**status_kwargs))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import logging

from celery import registry # pylint: disable=no-name-in-module
from billiard import VERSION

from opentelemetry.semconv.trace import SpanAttributes

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.41b0.dev"
__version__ = "0.42b0.dev"
Loading

0 comments on commit 14a4452

Please sign in to comment.