View Source Stripe.Telemetry (Striped v0.5.0)

Telemetry integration.

Unless specified, all times are in :native units.

Stripe executes the following events:

request-start

Request Start

[:stripe, :request, :start] - Executed before an api call is made

Measurements

  • :system_time - The system time.

Metadata

  • :attempt - The number of attempts for this request
  • :method - The http method used
  • :url - The url used

request-stop

Request Stop

[:stripe, :request, :stop] - Executed after an api call ended.

Measurements

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

Metadata

  • :attempt - The number of attempts for this request
  • :error - The Stripe error if any
  • :status - The http status code
  • :request_id - Request ID returned by Stripe
  • :result -> :ok for succesful requests, :error otherwise
  • :method - The http method used
  • :url - The url used

request-exception

Request Exception

[:stripe, :request, :exception] - Executed when an exception occurs while executing an api call.

Measurements

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

Metadata

  • :attempt - The number of attempts for this request
  • :method - The http method used
  • :url - The url used
  • :kind - The type of exception.
  • :reason - Error description or error data.
  • :stacktrace - The stacktrace.