From b10e6b14673abf29131879c5ee0b792065e833d4 Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:28:35 -0700 Subject: [PATCH 1/3] Add consistent import statement for URLLibInstrumentor --- instrumentation/opentelemetry-instrumentation-urllib/README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/README.rst b/instrumentation/opentelemetry-instrumentation-urllib/README.rst index c78e092fb4..a8dfc84bed 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/README.rst +++ b/instrumentation/opentelemetry-instrumentation-urllib/README.rst @@ -29,6 +29,8 @@ The hooks can be configured as follows: .. code:: python + from opentelemetry.instrumentation.urllib import URLLibInstrumentor + # `request_obj` is an instance of urllib.request.Request def request_hook(span, request_obj): pass From b1b2bf7861f33ed2145cade0902db0d531838ddf Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:30:58 -0700 Subject: [PATCH 2/3] Correct code in example --- instrumentation/opentelemetry-instrumentation-urllib/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/README.rst b/instrumentation/opentelemetry-instrumentation-urllib/README.rst index a8dfc84bed..cc941ce91b 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/README.rst +++ b/instrumentation/opentelemetry-instrumentation-urllib/README.rst @@ -41,7 +41,7 @@ The hooks can be configured as follows: pass URLLibInstrumentor.instrument( - request_hook=request_hook, response_hook=response_hook) + request_hook=request_hook, response_hook=response_hook ) Exclude lists From 3ffeb009f3572dc26e26f3dc93f6bad1784ad0ec Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:15:51 -0700 Subject: [PATCH 3/3] One last correction to doc to create instance --- instrumentation/opentelemetry-instrumentation-urllib/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/README.rst b/instrumentation/opentelemetry-instrumentation-urllib/README.rst index cc941ce91b..f673fb07f9 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/README.rst +++ b/instrumentation/opentelemetry-instrumentation-urllib/README.rst @@ -40,7 +40,7 @@ The hooks can be configured as follows: def response_hook(span, request_obj, response) pass - URLLibInstrumentor.instrument( + URLLibInstrumentor().instrument( request_hook=request_hook, response_hook=response_hook )