View Source OpentelemetryAbsinthe.Instrumentation (opentelemetry_absinthe v2.2.1)

Module for automatic instrumentation of Absinthe resolution.

It works by listening to [:absinthe, :execute, :operation, :start/:stop] telemetry events, which are emitted by Absinthe only since v1.5; therefore it won't work on previous versions.

(you can still call OpentelemetryAbsinthe.Instrumentation.setup() in your application startup code, it just won't do anything.)

Summary

Types

Link to this type

graphql_handled_event_error()

View Source
@type graphql_handled_event_error() :: %{
  locations: [%{column: integer(), line: integer()}],
  message: String.t(),
  path: [String.t()]
}
Link to this type

graphql_handled_event_measurements()

View Source
@type graphql_handled_event_measurements() :: %{duration: :int}
Link to this type

graphql_handled_event_metadata()

View Source
@type graphql_handled_event_metadata() :: %{
  operation_name: String.t() | nil,
  operation_type: :query | :mutation,
  schema: Absinthe.Schema.t(),
  errors: [graphql_handled_event_error()] | nil,
  status: :ok | :error
}

Functions

Link to this function

handle_operation_start(event_name, measurements, metadata, config)

View Source
Link to this function

handle_operation_stop(event_name, measurements, data, config)

View Source
Link to this function

setup(instrumentation_opts \\ [])

View Source
Link to this macro

span_ctx(args \\ [])

View Source (macro)
Link to this macro

span_ctx(record, args)

View Source (macro)