Skip to content

Commit e9ad6c6

Browse files
committed
Update __init__.py
Add missing docs for other constructor params
1 parent 6f7a37a commit e9ad6c6

File tree

1 file changed

+17
-10
lines changed
  • instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi

1 file changed

+17
-10
lines changed

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

+17-10
Original file line numberDiff line numberDiff line change
@@ -449,20 +449,27 @@ class OpenTelemetryMiddleware:
449449
450450
Args:
451451
app: The ASGI application callable to forward requests to.
452+
excluded_urls: (opentelemetry.util.http.ExcludeList) Optional parameter to specify URLs that should be excluded from tracing.
453+
This can be useful for skipping health checks or other endpoints that do not need to be monitored.
454+
Defaults to None.
452455
default_span_details: Callback which should return a string and a tuple, representing the desired default span name and a
453-
dictionary with any additional span attributes to set.
454-
Optional: Defaults to get_default_span_details.
456+
dictionary with any additional span attributes to set.
457+
Optional: Defaults to get_default_span_details.
455458
server_request_hook: Optional callback which is called with the server span and ASGI
456-
scope object for every incoming request.
459+
scope object for every incoming request.
457460
client_request_hook: Optional callback which is called with the internal span and an ASGI
458-
scope which is sent as a dictionary for when the method receive is called.
461+
scope which is sent as a dictionary for when the method receive is called.
459462
client_response_hook: Optional callback which is called with the internal span and an ASGI
460-
event which is sent as a dictionary for when the method send is called.
461-
excluded_urls: (opentelemetry.util.http.ExcludeList) Optional parameter to specify URLs that should be excluded from tracing.
462-
This can be useful for skipping health checks or other endpoints that do not need to be monitored.
463-
Defaults to None.
464-
tracer_provider: The optional tracer provider to use. If omitted
465-
the current globally configured one is used.
463+
event which is sent as a dictionary for when the method send is called.
464+
tracer_provider: The optional tracer provider to use. If omitted, the current globally configured one is used.
465+
meter_provider: Optional. The meter provider to use for creating metric instruments. If omitted, the current globally configured meter provider is used.
466+
This allows for the collection of metrics in addition to traces.
467+
http_capture_headers_server_request: Optional. A list of request header names whose values will be captured in the span attributes for server requests.
468+
This can be used to include specific HTTP request headers in the tracing information.
469+
http_capture_headers_server_response: Optional. A list of response header names whose values will be captured in the span attributes for server responses.
470+
This allows for including specific HTTP response headers in the tracing data.
471+
http_capture_headers_sanitize_fields: Optional. A list of header names for which the values should be sanitized before being added to the span.
472+
This is useful for headers that contain sensitive information that should not be stored in trace data.
466473
"""
467474

468475
# pylint: disable=too-many-branches

0 commit comments

Comments
 (0)