|
7 | 7 | module OpenTelemetry |
8 | 8 | module Instrumentation |
9 | 9 | module ActionMailer |
10 | | - # The Instrumentation class contains logic to detect and install the ActionMailer instrumentation |
| 10 | + # The {OpenTelemetry::Instrumentation::ActionMailer::Instrumentation} class contains logic to detect and install the ActionMailer instrumentation |
| 11 | + # |
| 12 | + # Installation and configuration of this instrumentation is done within the |
| 13 | + # {https://www.rubydoc.info/gems/opentelemetry-sdk/OpenTelemetry/SDK#configure-instance_method OpenTelemetry::SDK#configure} |
| 14 | + # block, calling {https://www.rubydoc.info/gems/opentelemetry-sdk/OpenTelemetry%2FSDK%2FConfigurator:use use()} |
| 15 | + # or {https://www.rubydoc.info/gems/opentelemetry-sdk/OpenTelemetry%2FSDK%2FConfigurator:use_all use_all()}. |
| 16 | + # |
| 17 | + # ## Configuration keys and options |
| 18 | + # |
| 19 | + # ### `:disallowed_notification_payload_keys` |
| 20 | + # |
| 21 | + # Specifies an array of keys that should be excluded from the `deliver.action_mailer` notification payload as span attributes. |
| 22 | + # |
| 23 | + # ### `:disallowed_process_payload_keys` |
| 24 | + # |
| 25 | + # Specifies an array of keys that should be excluded from the `process.action_mailer` notification payload as span attributes. |
| 26 | + # |
| 27 | + # ### `:notification_payload_transform` |
| 28 | + # |
| 29 | + # - `proc` **default** `nil` |
| 30 | + # |
| 31 | + # Specifies custom proc used to extract span attributes form the `deliver.action_mailer` notification payload. Use this to rename keys, extract nested values, or perform any other custom logic. |
| 32 | + # |
| 33 | + # ### `:process_payload_transform` |
| 34 | + # |
| 35 | + # - `proc` **default** `nil` |
| 36 | + # |
| 37 | + # Specifies custom proc used to extract span attributes form the `process.action_mailer` notification payload. Use this to rename keys, extract nested values, or perform any other custom logic. |
| 38 | + # |
| 39 | + # ### `:email_address` |
| 40 | + # |
| 41 | + # - `symbol` **default** `:omit` |
| 42 | + # |
| 43 | + # Specifies whether to include email addresses in the notification payload. Valid values are `:omit` and `:include`. |
| 44 | + # |
| 45 | + # @example An explicit default configuration |
| 46 | + # OpenTelemetry::SDK.configure do |c| |
| 47 | + # c.use_all({ |
| 48 | + # 'OpenTelemetry::Instrumentation::ActionMailer' => { |
| 49 | + # disallowed_notification_payload_keys: [], |
| 50 | + # disallowed_process_payload_keys: [], |
| 51 | + # notification_payload_transform: nil, |
| 52 | + # process_payload_transform: nil, |
| 53 | + # email_address: :omit, |
| 54 | + # }, |
| 55 | + # }) |
| 56 | + # end |
11 | 57 | class Instrumentation < OpenTelemetry::Instrumentation::Base |
12 | 58 | MINIMUM_VERSION = Gem::Version.new('6.1.0') |
13 | 59 | EMAIL_ATTRIBUTE = %w[email.to.address email.from.address email.cc.address email.bcc.address].freeze |
|
0 commit comments