View Source ExInsights.Telemetry.RequestTelemetry (ExInsights v0.8.1)

Report incoming requests processing

Link to this section Summary

Types

t()

Telemetry about the incoming request processsed by the application

Link to this section Types

@type option() ::
  {:response_code, String.t() | number()}
  | {:measurements, ExInsights.Telemetry.Types.measurements()}
  | ExInsights.Telemetry.CommonTelemetry.option()
@type t() :: %ExInsights.Telemetry.RequestTelemetry{
  common: ExInsights.Telemetry.CommonTelemetry.t(),
  duration: ExInsights.Telemetry.Types.millisecond(),
  id: binary(),
  measurements: ExInsights.Telemetry.Types.measurements(),
  name: ExInsights.Telemetry.Types.name(),
  responseCode: String.t() | number(),
  source: String.t(),
  success: boolean(),
  url: String.t()
}

Telemetry about the incoming request processsed by the application

  • :id: id of incoming request (string)
  • :name: Request name (string or atom)
  • :url: Request url (string)
  • :source: Request source. This encapsulates the information about the component that initiated the request (string)
  • :duration: Request processing time in ms (non-neg integer)
  • :responseCode: Result code reported by the application (string or number)
  • :success: Whether the request was successful (bool)
  • :measurements: Collection of custom measurements (map of string -> number)
  • :common: Properties shared by all Telemetry types. See ExInsights.Telemetry.CommonTelemetry for more info.

Link to this section Functions

Link to this function

new(id, name, url, source, duration, success?, options \\ [])

View Source
@spec new(
  id :: binary(),
  name :: ExInsights.Telemetry.Types.name(),
  url :: String.t(),
  source :: String.t(),
  duration :: ExInsights.Telemetry.Types.millisecond(),
  success? :: boolean(),
  options :: [option()]
) :: t()