Skip to content

Commit

Permalink
Merge branch 'main' into dbapi-more-attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
keithZmudzinski committed Sep 13, 2024
2 parents f70c613 + bed13f5 commit ecab5a3
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 ecab5a3

Please sign in to comment.