View Source Bandit.Telemetry (Bandit v1.0.0-pre.13)
The following telemetry spans are emitted by bandit
[:bandit, :request, *]
Represents Bandit handling a specific client HTTP request
This span is started by the following event:
[:bandit, :request, :start]
Represents the start of the span
This event contains the following measurements:
monotonic_time
: The time of this event, in:native
units
This event contains the following metadata:
telemetry_span_context
: A unique identifier for this spanconnection_telemetry_span_context
: The span context of the Thousand Island:connection
span which contains this request
This span is ended by the following event:
[:bandit, :request, :stop]
Represents the end of the span
This event contains the following measurements:
monotonic_time
: The time of this event, in:native
unitsduration
: The span duration, in:native
unitsreq_header_end_time
: The time that header reading completed, in:native
unitsreq_body_start_time
: The time that request body reading started, in:native
units.req_body_end_time
: The time that request body reading completed, in:native
unitsreq_line_bytes
: The length of the request line, in octets. Includes all line breaks. Not included for HTTP/2 requestsreq_header_bytes
: The length of the request headers, in octets. Includes all line breaks. Not included for HTTP/2 requestsreq_body_bytes
: The length of the request body, in octetsresp_start_time
: The time that the response started, in:native
unitsresp_end_time
: The time that the response completed, in:native
units. Not included for chunked responsesresp_line_bytes
: The length of the reponse line, in octets. Includes all line breaks. Not included for HTTP/2 requestsresp_header_bytes
: The length of the reponse headers, in octets. Includes all line breaks. Not included for HTTP/2 requestsresp_body_bytes
: The length of the reponse body, in octets. If the response is compressed, this is the size of the compressed payload as sent on the wire. Set to 0 for chunked responsesresp_uncompressed_body_bytes
: The length of the original, uncompressed body. Only included for responses which are compressedresp_compression_method
: The method of compression, as sent in theContent-Encoding
header of the response. Only included for responses which are compressed
This event contains the following metadata:
telemetry_span_context
: A unique identifier for this spanconnection_telemetry_span_context
: The span context of the Thousand Island:connection
span which contains this requestmethod
: The HTTP method of the request. If Bandit could not determine the method, this will be nilrequest_target
: The raw request target for the request. Returned as a tuple comprising the constituent parts of the request target:{scheme, host, port, path}
. If Bandit could not determine the request target, this will be nilstatus
: The numeric response status code of the responseconn
: ThePlug.Conn
representing this connection. Not present in cases whereerror
is also setstream_id
: The stream ID of the request, if part of an HTTP/2 connectionerror
: The error that caused the span to end, if it ended in error
The following events may be emitted within this span:
[:bandit, :request, :exception]
The request for this span ended unexpectedly
This event contains the following measurements:
monotonic_time
: The time of this event, in:native
units
This event contains the following metadata:
telemetry_span_context
: A unique identifier for this spanconnection_telemetry_span_context
: The span context of the Thousand Island:connection
span which contains this requestkind
: The kind of unexpected condition, typically:exit
exception
: The exception which caused this unexpected terminationstacktrace
: The stacktrace of the location which caused this unexpected termination
[:bandit, :websocket, *]
Represents Bandit handling a WebSocket connection
This span is started by the following event:
[:bandit, :websocket, :start]
Represents the start of the span
This event contains the following measurements:
monotonic_time
: The time of this event, in:native
unitscompress
: Details about the compression configuration for this connection
This event contains the following metadata:
telemetry_span_context
: A unique identifier for this spanorigin_telemetry_span_context
: The span context of the Bandit:request
span from which this connection originatedconnection_telemetry_span_context
: The span context of the Thousand Island:connection
span which contains this request
This span is ended by the following event:
[:bandit, :websocket, :stop]
Represents the end of the span
This event contains the following measurements:
monotonic_time
: The time of this event, in:native
unitsduration
: The span duration, in:native
unitsrecv_text_frame_count
: The number of text frames receivedrecv_text_frame_bytes
: The total number of bytes received in the payload of text framesrecv_binary_frame_count
: The number of binary frames receivedrecv_binary_frame_bytes
: The total number of bytes received in the payload of binary framesrecv_ping_frame_count
: The number of ping frames receivedrecv_ping_frame_bytes
: The total number of bytes received in the payload of ping framesrecv_pong_frame_count
: The number of pong frames receivedrecv_pong_frame_bytes
: The total number of bytes received in the payload of pong framesrecv_connection_close_frame_count
: The number of connection close frames receivedrecv_connection_close_frame_bytes
: The total number of bytes received in the payload of connection close framesrecv_continuation_frame_count
: The number of continuation frames receivedrecv_continuation_frame_bytes
: The total number of bytes received in the payload of continuation framessend_text_frame_count
: The number of text frames sentsend_text_frame_bytes
: The total number of bytes sent in the payload of text framessend_binary_frame_count
: The number of binary frames sentsend_binary_frame_bytes
: The total number of bytes sent in the payload of binary framessend_ping_frame_count
: The number of ping frames sentsend_ping_frame_bytes
: The total number of bytes sent in the payload of ping framessend_pong_frame_count
: The number of pong frames sentsend_pong_frame_bytes
: The total number of bytes sent in the payload of pong framessend_connection_close_frame_count
: The number of connection close frames sentsend_connection_close_frame_bytes
: The total number of bytes sent in the payload of connection close framessend_continuation_frame_count
: The number of continuation frames sentsend_continuation_frame_bytes
: The total number of bytes sent in the payload of continuation frames
This event contains the following metadata:
telemetry_span_context
: A unique identifier for this spanorigin_telemetry_span_context
: The span context of the Bandit:request
span from which this connection originatedconnection_telemetry_span_context
: The span context of the Thousand Island:connection
span which contains this requesterror
: The error that caused the span to end, if it ended in error
Summary
Types
@opaque t()
Functions
@spec monotonic_time() :: integer()
@spec span_exception(t(), Exception.kind(), Exception.t(), Exception.stacktrace()) :: :ok