Skip to content

Debugging Service Desk

Docs

The Monitor:Respond group is responsible for Service Desk product development.

Additionally, the Scalability group has been doing some infrastructure work around mailroom on gitlab.com.

Despite being a free feature, Service Desk has low usage and spikes up and down (e.g. weekends/holidays). Zoom out to a few days (3 or 7) to get a feel for the impact.

  • Is traffic completely flat?
  • Is traffic lower than normal?
  • No detectable change?
    • Customers may be using an uncommon service for redirection that has changed its headers.
    • The customer’s email may be marked as Spam in the incoming mail inbox.

Check the Respond Grafana charts

  • Is there a noticeable impact?

There are helpful links to the side of the Respond charts (e.g. Kibana, Sentry links).

Try to reproduce via a known Service Desk - e.g. this sandbox

A good place to start is to get two emails sent to a known Service Desk experiencing issues - one that works (or worked), one that doesn’t. Get them forwarded as eml files to ensure headers are intact. Ask someone with a service desk setup to send you the emails they received.

Docs: Incoming email and Configuring Service Desk

Since our email ingestion (and eventually Service Desk) uses header content to determine where an email is going, compare the headers to see if anything has changed.

Production issue 6419 was due to a change in headers, specifically Delivered-To no longer being added to Google Group emails.

The project key should be visible in the headers, and that’s how Service Desk knows which project to create the new issue in.

At the time of writing, most Service Desk setups use a redirection mechanism (e.g. through a third-party Google group) or forwarding since it allows the user to distribute a fully customized email address, and reduces chance of abuse by obscuring the Service Desk email address and allowing it to be changed.

  • Did the issue get created in that project, or another project (was the project key correct)?
  • Did the sender get a “thank you” email (either a thank you email for that Service Desk, a different Service Desk, or a “I don’t know where that email should go” email)
  • If no thank you email, did the email wind up as a note somewhere (ie. ingested into a different part of the GitLab instance)?

In the past we’ve had:

For gitlab.com - SREs have access to the [email protected] mailbox, which can be checked to see if an email was received at all.

You can look up what happened to a specific e-mail by matching its SMTP Message-Id header to the json.mail_uid field.

In Kibana, find the logs via search: json.mail_uid: <Message-Id> and either json.class: EmailReceiverWorker or json.class: ServiceDeskEmailReceiverWorker (Service Desk emails may be serviced by either worker class, so it’s ideal to check both) Here’s an example.

The headers we log are in lib/gitlab/email/receiver.rb.

SMTP headerLog field
Message-Idjson.mail_uid
Fromjson.from_address
Tojson.to_address
Delivered-Tojson.delivered_to
Envelope-Tojson.envelope_to
X-Envelope-Tojson.x_envelope_to

A full list of the headers we accept can be found the incoming email documentation.

Emails go through the following to get to Service Desk: