Skip to content

Commit 878825b

Browse files
committed
corrected instrumentation example in urllib3
1 parent 1a1163e commit 878825b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131

3232
### Fixed
3333

34+
- Fixed urllib3 instrumentation example in instrumentation documentation
35+
([#1793](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1793))
3436
- Fix elasticsearch db.statement attribute to be sanitized by default
3537
([#1758](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1758))
3638
- Fix `AttributeError` when AWS Lambda handler receives a list event

instrumentation/opentelemetry-instrumentation-urllib3/README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ The hooks can be configured as follows:
3838
def response_hook(span, request, response):
3939
pass
4040
41-
URLLib3Instrumentor.instrument(
42-
request_hook=request_hook, response_hook=response_hook)
41+
URLLib3Instrumentor().instrument(
42+
request_hook=request_hook, response_hook=response_hook
4343
)
4444
4545
Exclude lists

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def request_hook(span, request):
5656
def response_hook(span, request, response):
5757
pass
5858
59-
URLLib3Instrumentor.instrument(
60-
request_hook=request_hook, response_hook=response_hook)
59+
URLLib3Instrumentor().instrument(
60+
request_hook=request_hook, response_hook=response_hook
6161
)
6262
6363
Exclude lists

0 commit comments

Comments
 (0)