log "Custom/nb_rcpt_tos" metric

This commit is contained in:
Son 2022-01-08 00:11:16 +01:00
parent 20b6ce29fc
commit ed39d47e7a
1 changed files with 3 additions and 0 deletions

View File

@ -2361,6 +2361,9 @@ class MailHandler:
envelope.mail_from,
envelope.rcpt_tos,
)
newrelic.agent.record_custom_metric(
"Custom/nb_rcpt_tos", len(envelope.rcpt_tos)
)
with create_light_app().app_context():
ret = handle(envelope, msg)