Skip to content

Mail-related instrumentation attribute key convention #927

Description

@xuan-cao-swi

Area(s)

area:client

Is your change request related to a problem? Please describe.

We are trying to introduce a new instrumentation for rails action mailer in opentelemetry-ruby-contrib, but we realize there is no semantic conventions for mail-related attributes (e.g. to, from, etc.); therefore, we want to propose new semantic conventions.

Related PR: open-telemetry/opentelemetry-ruby-contrib#887

Describe the solution you'd like

Current rails action mailer payload have following key for attributes (doc):

Key Value
:mailer Name of the mailer class
:message_id ID of the message, generated by the Mail gem
:subject Subject of the mail
:to To address(es) of the mail
:from From address of the mail
:bcc BCC addresses of the mail
:cc CC addresses of the mail
:date Date of the mail
:mail The encoded form of the mail
:perform_deliveries Whether delivery of this message is performed or not

We propose to use Elastic Common Schema ECS email as the standard semantic conventions.

Key Attribute Key Value
EMAIL_X_MAILER email.x_mailer Name of the mailer class
EMAIL_MESSAGE_ID email.message_id ID of the message, generated by the Mail gem
EMAIL_SUBJECT email.subject Subject of the mail
EMAIL_TO_ADDRESS email.to.address To address(es) of the mail
EMAIL_FROM_ADDRESS email.from.address From address of the mail
EMAIL_BCC_ADDRESS email.bcc.address BCC addresses of the mail
EMAIL_CC_ADDRESS email.date.address CC addresses of the mail
EMAIL_ORIGINATION_TIMESTAMP email.origination_timestamp Date of the mail

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Needs SIG

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions