Skip to content

Commit 979ed59

Browse files
authored
Merge branch 'main' into feature/1765-add-otelTraceSampled-logging
2 parents 0dadd9f + f46a6e1 commit 979ed59

File tree

7 files changed

+16
-10
lines changed

7 files changed

+16
-10
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- `opentelemetry-instrumentation-system-metrics` Add `process.` prefix to `runtime.memory`, `runtime.cpu.time`, and `runtime.gc_count`. Change `runtime.memory` from count to UpDownCounter. ([#1735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1735))
1111
- Add request and response hooks for GRPC instrumentation (client only)
1212
([#1706](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1706))
13+
- `opentelemetry-instrumentation-pymemcache` Update instrumentation to support pymemcache >4
14+
([#1764](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1764))
1315

1416
### Added
1517

1618
- Add `excluded_urls` functionality to `urllib` and `urllib3` instrumentations
1719
([#1733](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1733))
1820
- Make Django request span attributes available for `start_span`.
1921
([#1730](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1730))
22+
- Make ASGI request span attributes available for `start_span`.
23+
([#1762](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1762))
2024

2125
### Fixed
2226

instrumentation/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
| [opentelemetry-instrumentation-mysql](./opentelemetry-instrumentation-mysql) | mysql-connector-python ~= 8.0 | No
2727
| [opentelemetry-instrumentation-pika](./opentelemetry-instrumentation-pika) | pika >= 0.12.0 | No
2828
| [opentelemetry-instrumentation-psycopg2](./opentelemetry-instrumentation-psycopg2) | psycopg2 >= 2.7.3.1 | No
29-
| [opentelemetry-instrumentation-pymemcache](./opentelemetry-instrumentation-pymemcache) | pymemcache >= 1.3.5, < 4 | No
29+
| [opentelemetry-instrumentation-pymemcache](./opentelemetry-instrumentation-pymemcache) | pymemcache >= 1.3.5, < 5 | No
3030
| [opentelemetry-instrumentation-pymongo](./opentelemetry-instrumentation-pymongo) | pymongo >= 3.1, < 5.0 | No
3131
| [opentelemetry-instrumentation-pymysql](./opentelemetry-instrumentation-pymysql) | PyMySQL < 2 | No
3232
| [opentelemetry-instrumentation-pyramid](./opentelemetry-instrumentation-pyramid) | pyramid >= 1.7 | Yes

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -531,15 +531,16 @@ async def __call__(self, scope, receive, send):
531531

532532
span_name, additional_attributes = self.default_span_details(scope)
533533

534+
attributes = collect_request_attributes(scope)
535+
attributes.update(additional_attributes)
534536
span, token = _start_internal_or_server_span(
535537
tracer=self.tracer,
536538
span_name=span_name,
537539
start_time=None,
538540
context_carrier=scope,
539541
context_getter=asgi_getter,
542+
attributes=attributes,
540543
)
541-
attributes = collect_request_attributes(scope)
542-
attributes.update(additional_attributes)
543544
active_requests_count_attrs = _parse_active_request_count_attrs(
544545
attributes
545546
)

instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333

3434
[project.optional-dependencies]
3535
instruments = [
36-
"pymemcache >= 1.3.5, < 4",
36+
"pymemcache >= 1.3.5, < 5",
3737
]
3838
test = [
3939
"opentelemetry-instrumentation-pymemcache[instruments]",

instrumentation/opentelemetry-instrumentation-pymemcache/src/opentelemetry/instrumentation/pymemcache/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 = ("pymemcache >= 1.3.5, < 4",)
16+
_instruments = ("pymemcache >= 1.3.5, < 5",)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"instrumentation": "opentelemetry-instrumentation-psycopg2==0.39b0.dev",
106106
},
107107
"pymemcache": {
108-
"library": "pymemcache >= 1.3.5, < 4",
108+
"library": "pymemcache >= 1.3.5, < 5",
109109
"instrumentation": "opentelemetry-instrumentation-pymemcache==0.39b0.dev",
110110
},
111111
"pymongo": {

tox.ini

+5-4
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ envlist =
122122
; ext-psycopg2 intentionally excluded from pypy3
123123

124124
; opentelemetry-instrumentation-pymemcache
125-
py3{7,8,9,10,11}-test-instrumentation-pymemcache{135,200,300,342}
126-
pypy3-test-instrumentation-pymemcache{135,200,300,342}
125+
py3{7,8,9,10,11}-test-instrumentation-pymemcache{135,200,300,342,400}
126+
pypy3-test-instrumentation-pymemcache{135,200,300,342,400}
127127

128128
; opentelemetry-instrumentation-pymongo
129129
py3{7,8,9,10,11}-test-instrumentation-pymongo
@@ -267,6 +267,7 @@ deps =
267267
pymemcache200: pymemcache >2.0.0,<3.0.0
268268
pymemcache300: pymemcache >3.0.0,<3.4.2
269269
pymemcache342: pymemcache ==3.4.2
270+
pymemcache400: pymemcache ==4.0.0
270271
httpx18: httpx>=0.18.0,<0.19.0
271272
httpx18: respx~=0.17.0
272273
httpx21: httpx>=0.19.0
@@ -311,7 +312,7 @@ changedir =
311312
test-instrumentation-pika{0,1}: instrumentation/opentelemetry-instrumentation-pika/tests
312313
test-instrumentation-aio-pika{7,8,9}: instrumentation/opentelemetry-instrumentation-aio-pika/tests
313314
test-instrumentation-psycopg2: instrumentation/opentelemetry-instrumentation-psycopg2/tests
314-
test-instrumentation-pymemcache{135,200,300,342}: instrumentation/opentelemetry-instrumentation-pymemcache/tests
315+
test-instrumentation-pymemcache{135,200,300,342,400}: instrumentation/opentelemetry-instrumentation-pymemcache/tests
315316
test-instrumentation-pymongo: instrumentation/opentelemetry-instrumentation-pymongo/tests
316317
test-instrumentation-pymysql: instrumentation/opentelemetry-instrumentation-pymysql/tests
317318
test-instrumentation-pyramid: instrumentation/opentelemetry-instrumentation-pyramid/tests
@@ -390,7 +391,7 @@ commands_pre =
390391

391392
mysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test]
392393

393-
pymemcache{135,200,300,342}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test]
394+
pymemcache{135,200,300,342,400}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test]
394395

395396
pymongo: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test]
396397

0 commit comments

Comments
 (0)