Bandit.Telemetry (Bandit v1.8.0)
View SourceThe 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:nativeunits
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:connectionspan which contains this requestconn: ThePlug.Connrepresenting this connection. Not present in cases whereerroris also set and the nature of error is such that Bandit was unable to successfully build the connplug: The Plug which is being used to serve this request. Specified as{plug_module, plug_opts}
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:nativeunitsduration: The span duration, in:nativeunitsreq_header_end_time: The time that header reading completed, in:nativeunitsreq_body_start_time: The time that request body reading started, in:nativeunits.req_body_end_time: The time that request body reading completed, in:nativeunitsreq_body_bytes: The length of the request body, in octetsresp_start_time: The time that the response started, in:nativeunitsresp_end_time: The time that the response completed, in:nativeunitsresp_body_bytes: The length of the response body, in octets. If the response is compressed, this is the size of the compressed payload as sent on the wireresp_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-Encodingheader 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:connectionspan which contains this requestconn: ThePlug.Connrepresenting this connection. Not present in cases whereerroris also set and the nature of error is such that Bandit was unable to successfully build the connplug: The Plug which is being used to serve this request. Specified as{plug_module, plug_opts}error: 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:nativeunits
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:connectionspan which contains this requestconn: ThePlug.Connrepresenting this connection. Not present in cases whereerroris also set and the nature of error is such that Bandit was unable to successfully build the connplug: The Plug which is being used to serve this request. Specified as{plug_module, plug_opts}kind: The kind of unexpected condition, typically:exitexception: The exception which caused this unexpected termination. May be an exception or an arbitrary value when the event was an uncaught throw or an exitstacktrace: 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:nativeunitscompress: Details about the compression configuration for this connection
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:connectionspan which contains this requestwebsock: The WebSock which is being used to serve this request. Specified aswebsock_module
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:nativeunitsduration: The span duration, in:nativeunitsrecv_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:requestspan from which this connection originatedconnection_telemetry_span_context: The span context of the Thousand Island:connectionspan which contains this requestwebsock: The WebSock which is being used to serve this request. Specified aswebsock_moduleerror: The error that caused the span to end, if it ended in error
Summary
Types
Functions
@spec monotonic_time() :: integer()
@spec span_exception( t(), Exception.kind(), Exception.t() | term(), Exception.stacktrace() ) :: :ok