Telemetry event definitions and span helpers for the DIMSE library.
All events are prefixed with [:dimse, ...] and follow the :telemetry
span convention (:start, :stop, :exception suffixes) where applicable.
Events
Association Lifecycle
[:dimse, :association, :start]-- association process started- Measurements:
%{system_time: integer()} Metadata:
%{association_id: String.t(), mode: :scp | :scu}
- Measurements:
[:dimse, :association, :stop]-- association process ended normally- Measurements:
%{duration: integer(), bytes_received: integer(), bytes_sent: integer()} - Metadata:
%{association_id: String.t(), reason: atom()}
- Measurements:
[:dimse, :association, :exception]-- association process crashed- Measurements:
%{duration: integer()} - Metadata:
%{association_id: String.t(), kind: atom(), reason: term()}
- Measurements:
Negotiation
[:dimse, :negotiation, :start]-- A-ASSOCIATE-RQ received (SCP) or sent (SCU)- Measurements:
%{system_time: integer()} Metadata:
%{association_id: String.t(), mode: :scp | :scu, calling_ae: String.t(), called_ae: String.t(), proposed_contexts_count: non_neg_integer()}
- Measurements:
[:dimse, :negotiation, :stop]-- negotiation completed- Measurements:
%{duration: integer()} Metadata:
%{association_id: String.t(), mode: :scp | :scu, accepted_contexts_count: non_neg_integer(), rejected_contexts_count: non_neg_integer(), result: :accepted | :rejected}
- Measurements:
TLS
[:dimse, :tls, :handshake]-- successful TLS handshake completed- Measurements:
%{} Metadata: `%{association_id: String.t(), protocol_version: atom() nil, cipher_suite: tuple() nil}`
- Measurements:
PDU
[:dimse, :pdu, :received]-- PDU decoded from socket- Measurements:
%{byte_size: integer()} - Metadata:
%{association_id: String.t(), pdu_type: atom()}
- Measurements:
[:dimse, :pdu, :sent]-- PDU encoded and sent to socket- Measurements:
%{byte_size: integer()} - Metadata:
%{association_id: String.t(), pdu_type: atom()}
- Measurements:
DIMSE Commands
[:dimse, :command, :start]-- DIMSE command processing started- Measurements:
%{system_time: integer()} - Metadata:
%{association_id: String.t(), command_field: integer(), message_id: integer()}
- Measurements:
[:dimse, :command, :stop]-- DIMSE command processing completed- Measurements:
%{duration: integer()} - Metadata:
%{association_id: String.t(), command_field: integer(), status: integer()}
- Measurements:
[:dimse, :command, :exception]-- DIMSE command processing failed- Measurements:
%{duration: integer()} - Metadata:
%{association_id: String.t(), command_field: integer(), kind: atom(), reason: term()}
- Measurements:
Handler Callbacks
[:dimse, :handler, :start]-- before SCP handler callback invoked- Measurements:
%{system_time: integer()} - Metadata:
%{association_id: String.t(), callback: atom(), command_field: integer()}
- Measurements:
[:dimse, :handler, :stop]-- after SCP handler callback returns- Measurements:
%{duration: integer()} - Metadata:
%{association_id: String.t(), callback: atom(), status: integer()}
- Measurements:
[:dimse, :handler, :exception]-- SCP handler callback raised, or a C-MOVE / C-GET fetcher (seeDimse.Handler) raised, threw, exited or returned an unexpected term- Measurements:
%{duration: integer()} - Metadata:
%{association_id: String.t(), callback: atom(), kind: atom(), reason: term()}.callbackis:fetcherfor fetcher failures, which have no matching start or stop event.
- Measurements:
Sub-Operations (C-GET / C-MOVE)
[:dimse, :sub_operation, :start]-- sub-operation processing begins- Measurements:
%{system_time: integer()} Metadata:
%{association_id: String.t(), type: :c_get | :c_move, total_instances: non_neg_integer()}
- Measurements:
[:dimse, :sub_operation, :progress]-- per sub-operation instance- Measurements:
%{} Metadata:
%{association_id: String.t(), type: :c_get | :c_move, completed: non_neg_integer(), failed: non_neg_integer(), remaining: non_neg_integer()}
- Measurements:
[:dimse, :sub_operation, :stop]-- all sub-operations complete- Measurements:
%{} Metadata:
%{association_id: String.t(), type: :c_get | :c_move, completed: non_neg_integer(), failed: non_neg_integer(), warning: non_neg_integer()}
- Measurements:
Span Helper
Dimse.Telemetry.span(:association, %{association_id: id}, fn ->
{result, %{bytes_received: n}}
end)
Summary
Functions
Emits a telemetry event with a flat event name atom.
Emits a telemetry event with a list event name.
Executes a function within a telemetry span.
Functions
Emits a telemetry event with a flat event name atom.
The atom is prefixed with [:dimse, event].
Emits a telemetry event with a list event name.
The list is prefixed with [:dimse | event_name].
Executes a function within a telemetry span.
Emits [:dimse, event, :start] before and [:dimse, event, :stop] or
[:dimse, event, :exception] after execution.