Class: OpenTelemetry::Instrumentation::ActiveStorage::Instrumentation

Inherits:
Base
  • Object
show all
Defined in:
lib/opentelemetry/instrumentation/active_storage/instrumentation.rb

Overview

The Instrumentation class contains logic to detect and install the ActiveStorage 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

  • array default []

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.

:key

  • symbol default :omit

Specifies whether to include secure token in the notification payload. Valid values are :omit and :include.

:url

  • symbol default :omit

Specifies whether to include url in the notification payload. Valid values are :omit and :include.

Examples:

An explicit default configuration

OpenTelemetry::SDK.configure do |c|
  c.use_all({
    'OpenTelemetry::Instrumentation::ActionMailer' => {
      disallowed_notification_payload_keys: [],
      notification_payload_transform: nil,
      key: :omit,
      url: :omit,
    },
  })
end

Constant Summary collapse

MINIMUM_VERSION =
Gem::Version.new('7.0.0')