I’ve submitted a PR that sends out a periodic e-mail to users who’s scheduled queries are failing and they have no indication of it. You can read the specifics in the issue, but the gist of it is - these reports are sent at most once an hour, and for each error, they show the amount of times it happened since the last report. If an error fails too much (say, 100 times), the failure is no longer reported. An indication that reports are about to stop is given prior to that.

At first, I thought this should be a text-only e-mail, but following @ranbena’s comment and looking at other failure reports, for example, Sentry’s, I get a feeling we should make our reports better than this piece of :peach::

Any suggestions?

@rauchy a few qs:

  1. Who are the recipients of this email report?
  2. What is the email subject?
  3. What exact information is available for the email template?
    I gather that each failing query is represented with:
    • Query title
    • Query url
    • Last failure
    • Total fail count
    • Fail count since last report
    • Report fail count threshold
    • Error message

Something I think is missing is

  1. A guide to “What can cause this?” or “What should I do now?” cc @jesse
  2. A call to action - like “Mute this thread” or “Disable this query”.

Wdyt?

1 Like

@rauchy a few qs:

  1. The user who created the query.
  2. “Failed Scheduled Query Executions”
  3. Yupp.

Interesting ideas, though I feel that:

  1. It could happen for so many reasons (from timeouts to broken data source connectivity)
  2. This would require an endpoint for muting such thread, alongside with matching state - and since this will automatically happen once reaching the threshold, I’m not sure it’s worth the effort.
  1. The user who created the query.

Perhaps also the account admin?

  1. “Failed Scheduled Query Executions”

Should have the word “Redash” in there somewhere.
Perhaps sth like “Redash failed to execute {count} of your queries”

@rauchy Can you share Sentry’s email? (subject+body)

Perhaps also the account admin?

I pity the account admin who’s data source is having connectivity issues and will receive countless e-mails.

Perhaps sth like “Redash failed to execute {count} of your queries”

:+1:

Here’s my proposed design:

Full html and preview:

Edit Failed query report email

@rauchy some html styles get stripped by email clients so if the template ain’t 100% in the email, lmk and I’ll adjust.

Another design option for the query link:

I’m working up an addition to the documentation about this. I’m curious, though, will we have an in-app notification about failed queries? Or does it only go out through email?

Thanks! Looks much better :wink:

We’re starting with e-mail notifications to have something. In-app is planned (see https://github.com/getredash/redash/issues/2593), though I’m not sure what is the priority for it.

The From name?

Those are definitely good ideas, but let’s keep them for future iterations.

The From name?

You can’t be sure admins will include “Redash” in their default senders.

looking f-i-n-e!

One small problem is with text wrapping, as seen here:

overflow: scroll; should be fine here, right?

overflow: scroll; should be fine here, right?

In the PR I suggested word-break: break-all instead. I think it does better.


@rauchy is this screenshot from an email client?

Feel free to send me this email and I’ll test it :+1:
Should test Outlook, Apple Mail, Gmail - desktop, web and mobile (stats).

Forwarded it to you. I’ve tested web+mobile for Apple Mail and Gmail. Do you have Outlook available?

Logo doesn’t show up on Gmail (web or mobile) :frowning:

Another thing about the logo: some email clients strip the background color, so the logo appears with the background color on a white email. Can it have transparent color?

Looking sweet in Outlook.
The relative/absolute positioning of the “Go to Query” button gets stripped but it’s still looking and behaving ok.

Web:

Mobile iOS: