Module: OpenTelemetry::Instrumentation::ActionView

Defined in:
lib/opentelemetry/instrumentation/action_view.rb,
lib/opentelemetry/instrumentation/action_view/railtie.rb,
lib/opentelemetry/instrumentation/action_view/version.rb,
lib/opentelemetry/instrumentation/action_view/instrumentation.rb

Overview

The Instrumentation class contains logic to detect and install the ActionView instrumentation

Installation and configuration of this instrumentation is done within the OpenTelemetry::SDK#configure block, calling use() or use_all().

Configuration keys and options

:disallowed_notification_payload_keys

Specifies an array of keys that should be excluded from the notification payload as span attributes.

:notification_payload_transform

  • proc default nil

Specifies custom proc used to extract span attributes form the notification payload. Use this to rename keys, extract nested values, or perform any other custom logic.

:legacy_span_names

  • boolean default false

Specifies whether spans names should use the legacy format where the subscription was reverse ordered and white space separated. (Ex. action_view render_template) If set to true, the span name will match the name of the notification itself. (Ex. render_template.action_view)

Examples:

An explicit default configuration

OpenTelemetry::SDK.configure do |c|
  c.use_all({
    'OpenTelemetry::Instrumentation::ActionView' => {
      disallowed_notification_payload_keys: [],
      legacy_span_names: true,
    },
  })
end

Defined Under Namespace

Classes: Instrumentation, Railtie

Constant Summary collapse

SUBSCRIPTIONS =
%w[
  render_template.action_view
  render_partial.action_view
  render_collection.action_view
  render_layout.action_view
].freeze
VERSION =
'0.7.3'