Skip to content

Commit

Permalink
Merge branch 'main' into http-metrics-server-arributes
Browse files Browse the repository at this point in the history
  • Loading branch information
emdneto authored Sep 13, 2024
2 parents fdb35ba + bed13f5 commit adae750
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,8 +40,8 @@ The hooks can be configured as follows:
def response_hook(span, request_obj, response)
pass
URLLibInstrumentor.instrument(
request_hook=request_hook, response_hook=response_hook)
URLLibInstrumentor().instrument(
request_hook=request_hook, response_hook=response_hook
)
Exclude lists
Expand Down

0 comments on commit adae750

Please sign in to comment.