View Source Finch.Telemetry (Finch v0.16.0)

Telemetry integration.

Unless specified, all times are in :native units.

Finch executes the following events:

request-start

Request Start

[:finch, :request, :start] - Executed when Finch.request/3 or Finch.stream/5 is called.

Measurements

  • :system_time - The system time.

Metadata

  • :name - The name of the Finch instance.
  • :request - The request (Finch.Request).

request-stop

Request Stop

[:finch, :request, :stop] - Executed after Finch.request/3 or Finch.stream/5 ended.

Measurements

  • :duration - Time taken from the request start event.

Metadata

  • :name - The name of the Finch instance.
  • :request - The request (Finch.Request).
  • :result - The result of the operation. In case of Finch.stream/5 this is {:ok, acc} | {:error, Exception.t()}, where acc is the accumulator result of the reducer passed in Finch.stream/5. In case of Finch.request/3 this is {:ok, Finch.Response.t()} | {:error, Exception.t()}.

request-exception

Request Exception

[:finch, :request, :exception] - Executed when an exception occurs while executing Finch.request/3 or Finch.stream/5.

Measurements

  • :duration - The time it took since the start before raising the exception.

Metadata

  • :name - The name of the Finch instance.
  • :request - The request (Finch.Request).
  • :kind - The type of exception.
  • :reason - Error description or error data.
  • :stacktrace - The stacktrace.

queue-start

Queue Start

[:finch, :queue, :start] - Executed before checking out a connection from the pool.

Measurements

  • :system_time - The system time.

Metadata

queue-stop

Queue Stop

[:finch, :queue, :stop] - Executed after a connection is retrieved from the pool.

Measurements

  • :duration - Time taken to check out a pool connection.
  • :idle_time - Elapsed time since the connection was last checked in or initialized.

Metadata

queue-exception

Queue Exception

[:finch, :queue, :exception] - Executed if checking out a connection throws an exception.

Measurements

  • :duration - The time it took since queue start event before raising an exception.

Metadata

  • :request - The request (Finch.Request).
  • :kind - The type of exception.
  • :reason - Error description or error data.
  • :stacktrace - The stacktrace.

connect-start

Connect Start

[:finch, :connect, :start] - Executed before opening a new connection. If a connection is being re-used this event will not be executed.

Measurements

  • :system_time - The system time.

Metadata

  • :scheme - The scheme used in the connection. either http or https.
  • :host - The host address.
  • :port - The port to connect on.

connect-stop

Connect Stop

[:finch, :connect, :stop] - Executed after a connection is opened.

Measurements

  • :duration - Time taken to connect to the host.

Metadata

  • :scheme - The scheme used in the connection. either http or https.
  • :host - The host address.
  • :port - The port to connect on.
  • :error - This value is optional. It includes any errors that occurred while opening the connection.

send-start

Send Start

[:finch, :send, :start] - Executed before sending a request.

Measurements

  • :system_time - The system time.
  • :idle_time - Elapsed time since the connection was last checked in or initialized.

Metadata

send-stop

Send Stop

[:finch, :send, :stop] - Executed after a request is finished.

Measurements

  • :duration - Time taken to make the request.
  • :idle_time - Elapsed time since the connection was last checked in or initialized.

Metadata

  • :request - The request (Finch.Request).
  • :error - This value is optional. It includes any errors that occurred while making the request.

receive-start

Receive Start

[:finch, :recv, :start] - Executed before receiving the response.

Measurements

  • :system_time - The system time.
  • :idle_time - Elapsed time since the connection was last checked in or initialized.

Metadata

receive-stop

Receive Stop

[:finch, :recv, :stop] - Executed after a response has been fully received.

Measurements

  • :duration - Duration to receive the response.
  • :idle_time - Elapsed time since the connection was last checked in or initialized.

Metadata

  • :request - The request (Finch.Request).
  • :status - The response status (Mint.Types.status()).
  • :headers - The response headers (Mint.Types.headers()).
  • :error - This value is optional. It includes any errors that occurred while receiving the response.

receive-exception

Receive Exception

[:finch, :recv, :exception] - Executed if an exception is thrown before the response has been fully received.

Measurements

  • :duration - The time it took before raising an exception

Metadata

  • :request - The request (Finch.Request).
  • :kind - The type of exception.
  • :reason - Error description or error data.
  • :stacktrace - The stacktrace.

reused-connection

Reused Connection

[:finch, :reused_connection] - Executed if an existing connection is reused. There are no measurements provided with this event.

Metadata

  • :scheme - The scheme used in the connection. either http or https.
  • :host - The host address.
  • :port - The port to connect on.

conn-max-idle-time-exceeded

Conn Max Idle Time Exceeded

[:finch, :conn_max_idle_time_exceeded] - Executed if a connection was discarded because the conn_max_idle_time had been reached.

Measurements

  • :idle_time - Elapsed time since the connection was last checked in or initialized.

Metadata

  • :scheme - The scheme used in the connection. either http or https.
  • :host - The host address.
  • :port - The port to connect on.

pool-max-idle-time-exceeded

Pool Max Idle Time Exceeded

[:finch, :pool_max_idle_time_exceeded] - Executed if a pool was terminated because the pool_max_idle_time has been reached. There are no measurements provided with this event.

Metadata

  • :scheme - The scheme used in the connection. either http or https.
  • :host - The host address.
  • :port - The port to connect on.

max-idle-time-exceeded-deprecated

Max Idle Time Exceeded (Deprecated)

[:finch, :max_idle_time_exceeded] - Executed if a connection was discarded because the max_idle_time had been reached.

Deprecated: use :conn_max_idle_time_exceeded event instead.

Measurements

  • :idle_time - Elapsed time since the connection was last checked in or initialized.

Metadata

  • :scheme - The scheme used in the connection. either http or https.
  • :host - The host address.
  • :port - The port to connect on.