Skip to content

Commit 0c27760

Browse files
committed
doc: expand ActionMailer::Instrumentation class docs
1 parent 8bdc55e commit 0c27760

File tree

1 file changed

+47
-1
lines changed
  • instrumentation/action_mailer/lib/opentelemetry/instrumentation/action_mailer

1 file changed

+47
-1
lines changed

instrumentation/action_mailer/lib/opentelemetry/instrumentation/action_mailer/instrumentation.rb

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,53 @@
77
module OpenTelemetry
88
module Instrumentation
99
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
1157
class Instrumentation < OpenTelemetry::Instrumentation::Base
1258
MINIMUM_VERSION = Gem::Version.new('6.1.0')
1359
EMAIL_ATTRIBUTE = %w[email.to.address email.from.address email.cc.address email.bcc.address].freeze

0 commit comments

Comments
 (0)