In a CI/CD environment deploys to production are happening all the time, often without knowledge of each other. A small change anywhere in the stack might be surfaced immediately to your customers when deployed, without the deployer’s knowledge. While Lightstep is great for finding the source of those errors once detected, many issues might be avoided if teams knew the health of the system before they deploy.
To help with that, Lightstep offers a Pre-Deploy GitHub action that checks the system health of the current environment. It let’s you know if there are any latency, error rate, or operation rate issues so you can investigate and if needed, resolve before a deploy.
GitHub Actions allow you to create a workflow for your repo. Triggers (like a push to a repo or the approval of a pull request) start the workflow and its steps (actions) are then run for you on a virtual machine. If any actions fail, the workflow stops and you’re notified. You can read all about GitHub Actions here.
The Lightstep Pre-Deploy Check action uses the Lightstep API to get all alerts that currently exist for your Streams and if any are violated, provides a link that allows you to see the violation in Lightstep.
If your system also uses Rollbar, you can add an integration to the action and see error information from Rollbar along with a link into Rollbar for more information.
If your system uses PagerDuty, you can integrate it into the action to include “who’s on-call” information for the service associated with the GitHub repository.
You’ll learn how to:
- Create a Stream and Alerts for a service.
- Create a deployment marker (you can skip Step 2 if you already have a deployment marker configured for your project).
- Add the Pre-Deploy Check action to an existing workflow in GitHub.
- Configure the action to integrate Rollbar and PagerDuty.
Before You Begin
You’ll need following to complete this Learning Path:
- A Lightstep account and project. If you don’t have one, sign up for a free account.
- A GitHub account and a GitHub token set as a secret.
An existing GitHub workflow that you’ll add this action to.
If you don’t have one, you can use our pull request review workflow to start.
- A Lightstep API key for your account set up as a GitHub secret.
If you want to integrate Rollbar and PagerDuty, you’ll need: