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

Telemetry for tracking remote calls (eg HTTP or SQL)

Link to this section Summary

Types

t()

Telemetry about the call to remote component

Link to this section Types

@type option() ::
  {:target, String.t()}
  | {:dependency_type_name, String.t()}
  | {:data, String.t()}
  | {:result_code, String.t() | number()}
  | ExInsights.Telemetry.CommonTelemetry.option()
@type t() :: %ExInsights.Telemetry.DependencyTelemetry{
  common: ExInsights.Telemetry.CommonTelemetry.t(),
  data: String.t(),
  dependencyTypeName: ExInsights.Telemetry.Types.name(),
  duration: ExInsights.Telemetry.Types.millisecond(),
  id: binary(),
  name: ExInsights.Telemetry.Types.name(),
  resultCode: String.t() | number(),
  success: boolean(),
  target: String.t()
}

Telemetry about the call to remote component

  • :id: request unique id (string)
  • :name: Remote call name, e.g. "CustomerList" (string)
  • :dependencyTypeName: Type name of the telemetry, such as HTTP or SQL (string)
  • :target: Remote component general target information. If left empty, this will be prepopulated with an extracted hostname from the data field, if it is a url. This prepopulation happens when calling trackDependency. Use track directly to avoid this behavior. (string)
  • :data: Remote call data. This is the most detailed information about the call, such as full URL or SQL statement (string)
  • :duration: Remote call duration in ms (non-neg integer)
  • :resultCode: Result code returned form the remote component. This is domain specific and can be HTTP status code or SQL result code (string or number)
  • :success: True if remote call was successful, false otherwise (boolean)

Link to this section Functions

Link to this function

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

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