Skip to content

Commit

Permalink
Merge branch 'main' into bump-idna
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx authored Jun 7, 2024
2 parents 06bc87f + bc4b049 commit 8d3701f
Show file tree
Hide file tree
Showing 86 changed files with 311 additions and 399 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Breaking changes

- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi`, `opentelemetry-instrumentation-starlette` Use `tracer` and `meter` of originating components instead of one from `asgi` middleware
([#2580](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2580))

### Fixed

- `opentelemetry-instrumentation-httpx` Ensure httpx.get or httpx.request like methods are instrumented
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
asgiref==3.7.2
attrs==23.2.0
certifi==2024.2.2
charset-normalizer==3.3.2
cramjam==2.8.1
Deprecated==1.2.14
idna==3.6
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
packaging==24.0
pluggy==1.5.0
protobuf==4.25.3
py==1.11.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
python-snappy==0.7.1
requests==2.31.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
flaky==3.7.0
importlib-metadata==6.11.0
iniconfig==2.0.0
markdown-it-py==3.0.0
mdurl==0.1.2
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
Pygments==2.17.2
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
rich==13.7.1
tomli==2.0.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
aio-pika==7.2.0
aiormq==6.2.3
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
idna==3.7
importlib-metadata==6.11.0
iniconfig==2.0.0
multidict==6.0.5
packaging==23.2
packaging==24.0
pamqp==3.1.0
pluggy==1.4.0
py==1.11.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.9.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
aio-pika==8.3.0
aiormq==6.6.4
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
idna==3.7
importlib-metadata==6.11.0
iniconfig==2.0.0
multidict==6.0.5
packaging==23.2
packaging==24.0
pamqp==3.2.1
pluggy==1.4.0
py==1.11.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.9.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
aio-pika==9.0.5
aiormq==6.7.1
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
idna==3.7
importlib-metadata==6.11.0
iniconfig==2.0.0
multidict==6.0.5
packaging==23.2
packaging==24.0
pamqp==3.2.1
pluggy==1.4.0
py==1.11.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.9.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
aio-pika==9.4.1
aiormq==6.8.0
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
idna==3.7
importlib-metadata==6.11.0
iniconfig==2.0.0
multidict==6.0.5
packaging==23.2
packaging==24.0
pamqp==3.3.0
pluggy==1.4.0
py==1.11.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.9.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ aiohttp==3.9.3
aiosignal==1.3.1
asgiref==3.7.2
async-timeout==4.0.3
attrs==23.2.0
blinker==1.7.0
certifi==2024.2.2
charset-normalizer==3.3.2
Expand All @@ -18,11 +17,10 @@ itsdangerous==2.1.2
Jinja2==3.1.3
MarkupSafe==2.1.5
multidict==6.0.5
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
requests==2.31.0
tomli==2.0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ aiohttp==3.9.3
aiosignal==1.3.1
asgiref==3.7.2
async-timeout==4.0.3
attrs==23.2.0
Deprecated==1.2.14
frozenlist==1.4.1
idna==3.7
importlib-metadata==6.11.0
iniconfig==2.0.0
multidict==6.0.5
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-aiohttp==1.0.5
pytest-asyncio==0.23.5
pytest-benchmark==4.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
aiopg==1.4.0
asgiref==3.7.2
async-timeout==4.0.3
attrs==23.2.0
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
install==1.3.5
packaging==23.2
pluggy==1.4.0
packaging==24.0
pluggy==1.5.0
psycopg2-binary==2.9.9
py==1.11.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.10.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ class OpenTelemetryMiddleware:
scope and event which are sent as dictionaries for when the method send is called.
tracer_provider: The optional tracer provider to use. If omitted
the current globally configured one is used.
meter_provider: The optional meter provider to use. If omitted
the current globally configured one is used.
"""

# pylint: disable=too-many-branches
Expand All @@ -474,17 +476,22 @@ def __init__(
client_response_hook: ClientResponseHook = None,
tracer_provider=None,
meter_provider=None,
tracer=None,
meter=None,
http_capture_headers_server_request: list[str] | None = None,
http_capture_headers_server_response: list[str] | None = None,
http_capture_headers_sanitize_fields: list[str] | None = None,
):
self.app = guarantee_single_callable(app)
self.tracer = trace.get_tracer(
__name__,
__version__,
tracer_provider,
schema_url="https://opentelemetry.io/schemas/1.11.0",
self.tracer = (
trace.get_tracer(
__name__,
__version__,
tracer_provider,
schema_url="https://opentelemetry.io/schemas/1.11.0",
)
if tracer is None
else tracer
)
self.meter = (
get_meter(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.9.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ def validate_outputs(self, outputs, error=None, modifiers=None):
self.assertEqual(span.name, expected["name"])
self.assertEqual(span.kind, expected["kind"])
self.assertDictEqual(dict(span.attributes), expected["attributes"])
self.assertEqual(
span.instrumentation_scope.name,
"opentelemetry.instrumentation.asgi",
)

def test_basic_asgi_call(self):
"""Test that spans are emitted as expected."""
Expand Down Expand Up @@ -728,6 +732,10 @@ def test_asgi_metrics(self):
self.assertTrue(len(resource_metric.scope_metrics) != 0)
for scope_metric in resource_metric.scope_metrics:
self.assertTrue(len(scope_metric.metrics) != 0)
self.assertEqual(
scope_metric.scope.name,
"opentelemetry.instrumentation.asgi",
)
for metric in scope_metric.metrics:
self.assertIn(metric.name, _expected_metric_names)
data_points = list(metric.data.data_points)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-asyncio==0.23.5
pytest-benchmark==4.0.0
tomli==2.0.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
asgiref==3.7.2
async-timeout==4.0.3
asyncpg==0.29.0
attrs==23.2.0
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.9.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.9.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
asgiref==3.7.2
attrs==23.2.0
boto==2.49.0
boto3==1.34.44
botocore==1.34.44
Expand All @@ -16,12 +15,11 @@ Jinja2==3.1.4
jmespath==1.0.1
MarkupSafe==2.1.5
moto==2.3.2
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pycparser==2.21
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
python-dateutil==2.8.2
pytz==2024.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
asgiref==3.7.2
attrs==23.2.0
boto3==1.34.44
botocore==1.34.44
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
jmespath==1.0.1
packaging==23.2
pluggy==1.4.0
py==1.11.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest==7.4.4
pytest-benchmark==4.0.0
python-dateutil==2.8.2
s3transfer==0.10.0
Expand Down
Loading

0 comments on commit 8d3701f

Please sign in to comment.