gen_rmq v3.0.0 GenRMQ.Consumer.Telemetry View Source

GenRMQ emits Telemetry events for consumers. It exposes several events for RabbitMQ connections, and message publishing.

Connection events

  • [:gen_rmq, :consumer, :connection, :start] - Dispatched by a GenRMQ consumer when a connection to RabbitMQ is started.

    • Measurement: %{system_time: integer}
    • Metadata: %{module: atom, attempt: integer, queue: String.t, exchange: String.t, routing_key: String.t}
  • [:gen_rmq, :consumer, :connection, :stop] - Dispatched by a GenRMQ consumer when a connection to RabbitMQ has been established. If an error occurs when a connection is being established then the optional :error key will be present in the metadata.

    • Measurement: %{duration: native_time}
    • Metadata: %{module: atom, attempt: integer, queue: String.t, exchange: String.t, routing_key: String.t, error: term()}
  • [:gen_rmq, :consumer, :connection, :down] - Dispatched by a GenRMQ consumer when a connection to RabbitMQ has been lost.

    • Measurement: %{system_time: integer}
    • Metadata: %{module: atom, reason: atom}

Message events

  • [:gen_rmq, :consumer, :message, :ack] - Dispatched by a GenRMQ consumer when a message has been acknowledged.

    • Measurement: %{system_time: integer}
    • Metadata: %{message: String.t}
  • [:gen_rmq, :consumer, :message, :reject] - Dispatched by a GenRMQ consumer when a message has been rejected.

    • Measurement: %{system_time: integer}
    • Metadata: %{message: String.t, requeue: boolean}
  • [:gen_rmq, :consumer, :message, :start] - Dispatched by a GenRMQ consumer when the processing of a message has begun.

    • Measurement: %{system_time: integer}
    • Metadata: %{message: String.t, module: atom}
  • [:gen_rmq, :consumer, :message, :stop] - Dispatched by a GenRMQ consumer when the processing of a message has completed.

    • Measurement: %{duration: native_time}
    • Metadata: %{message: String.t, module: atom}
  • [:gen_rmq, :consumer, :message, :exception] - Dispatched by a GenRMQ consumer when a message fails to be processed.

    • Measurement: %{duration: native_time}
    • Metadata: %{module: atom, reason: tuple, message: GenRMQ.Message.t, kind: atom, reason: term(), stacktrace: list() }

Link to this section Summary

Link to this section Functions

Link to this function

emit_message_exception_event(module, message, start_time, kind, reason, stacktrace)

View Source