Skip to content

Commit 6ea107e

Browse files
committed
Added asgiref depedency to opentelemetry-instrumentation-asgi
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.
1 parent c24c77d commit 6ea107e

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.6.2-0.25b2...HEAD)
9+
### Fixed
10+
11+
- `opentelemetry-instrumentation-asgi` now explicitly depends on asgiref as it uses the package instead of instrumenting it.
12+
([#765](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/765))
913

1014
## [1.6.2-0.25b2](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.6.2-0.25b2) - 2021-10-19
1115

instrumentation/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| --------------- | ------------------ |
44
| [opentelemetry-instrumentation-aiohttp-client](./opentelemetry-instrumentation-aiohttp-client) | aiohttp ~= 3.0 |
55
| [opentelemetry-instrumentation-aiopg](./opentelemetry-instrumentation-aiopg) | aiopg >= 0.13.0, < 1.3.0 |
6-
| [opentelemetry-instrumentation-asgi](./opentelemetry-instrumentation-asgi) | asgiref ~= 3.0 |
6+
| [opentelemetry-instrumentation-asgi](./opentelemetry-instrumentation-asgi) | asgi |
77
| [opentelemetry-instrumentation-asyncpg](./opentelemetry-instrumentation-asyncpg) | asyncpg >= 0.12.0 |
88
| [opentelemetry-instrumentation-boto](./opentelemetry-instrumentation-boto) | boto~=2.0 |
99
| [opentelemetry-instrumentation-botocore](./opentelemetry-instrumentation-botocore) | botocore ~= 1.0 |

instrumentation/opentelemetry-instrumentation-asgi/setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ install_requires =
4343
opentelemetry-semantic-conventions == 0.25b2
4444
opentelemetry-instrumentation == 0.25b2
4545
opentelemetry-util-http == 0.25b2
46+
asgiref ~= 3.0
4647

4748
[options.extras_require]
4849
test =

instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414

1515

16-
_instruments = ("asgiref ~= 3.0",)
16+
_instruments = tuple()

opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
"library": "aiopg >= 0.13.0, < 1.3.0",
2525
"instrumentation": "opentelemetry-instrumentation-aiopg==0.25b2",
2626
},
27-
"asgiref": {
28-
"library": "asgiref ~= 3.0",
29-
"instrumentation": "opentelemetry-instrumentation-asgi==0.25b2",
30-
},
3127
"asyncpg": {
3228
"library": "asyncpg >= 0.12.0",
3329
"instrumentation": "opentelemetry-instrumentation-asyncpg==0.25b2",
@@ -134,6 +130,7 @@
134130
},
135131
}
136132
default_instrumentations = [
133+
"opentelemetry-instrumentation-asgi==0.25b2",
137134
"opentelemetry-instrumentation-dbapi==0.25b2",
138135
"opentelemetry-instrumentation-logging==0.25b2",
139136
"opentelemetry-instrumentation-sqlite3==0.25b2",

0 commit comments

Comments
 (0)