Skip to content

Allow title truncation to be disabled or configured in Slack integration #10811

@sgrimm-sg

Description

@sgrimm-sg

Summary

When a notification is sent to Slack via the Slack integration, the title is always truncated to 40 characters and the culprit is included in its entirety. Add a way to either disable title truncation entirely or set the limit to something higher than 40.

Motivation

For some applications, the text of an error is far more useful for initial troubleshooting than the culprit is. For example, in a Java application, I might have code like

log.error("Unable to contact service for destination {}", destinationId);

The Slack notification title gets rendered as,

Unable to contact email service for destinatio - com.mycompany.myservice.common.client.email.aws.AmazonSESClient

In this case the destination is the thing I want to know if I'm monitoring an alerts Slack channel, but it is cut from the Slack message in favor of the fully-qualified class name, which has no length limit.

If the total length of the title has to be limited, I'd much rather lose the package name, or even the entire class name, than any of the message.

The truncation is happening here:

return u'{} - {}'.format(group.title[:40], group.culprit)

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions