HttpSpanMixin Class

Can be used to get HTTP span attributes settings for free.

Inheritance
builtins.object
HttpSpanMixin

Constructor

HttpSpanMixin()

Methods

set_http_attributes

Add correct attributes for a http client span.

set_http_attributes

Add correct attributes for a http client span.

set_http_attributes(request: HttpRequest, response: Optional[HttpResponseType] = None) -> None

Parameters

request
HttpRequest
Required

The request made

response
HttpResponse or AsyncHttpResponse
default value: None

The response received by the server. Is None if no response received.