Set up Sentries that depend on other Sentries
Many companies use a data collection process that takes many hours to complete, and then reports are updated with new data. A classic example of this would be having a daily ETL process followed by an update of data (more specific example: you run a daily data pipeline, and then extract this data into Tableau).
Example for setting upstream Sentries
A Sentry can be connected to one or more Upstream Sentry. When the current Sentry is updated through the API, it then will take into account information from its Upstream Sentries.
Set up upstream Sentries:
In this example, we create two Sentries - Data pipeline and Extract
Next, we set the Data Pipeline Sentry to be Upstream from the Extract Sentry. On the Extract Sentry page, click the Connect Upstream Sentries button. In the Connect Upstream Sentries window, select the Data pipeline Sentry.
Connect the Extract Sentry to a Hoot.
When an API updates, the Extract Sentry and information from Upstream Sentries, such as meta[lastest_record_at] and state are used to compute the current value for the Extract Sentry.
Let us walk through some changes and see what happens to the connected Hoot.
Success scenario
After being setup, one connected Hoot has a Happy state.
Let us say the Data Pipeline runs, and sets the meta[lastest_record_at] record. Nothing changes yet on the connected Hoot, because an API hasn’t updated the Downstream Sentry yet.
The extract runs and calls the API on the Extract Sentry to say that everything is Happy. Now, since there is no latest_record_at set on the Extract Sentry, it consults the Upstream Sentries to find the latest latest_record_at value, and uses this for the Hoot. The Hoot state is Happy.
Failure scenario
Let us say, the next day the Data Pipeline fails. The Pipeline Sentry is Sick, but nothing changes yet on the connected Hoot because an API hasn’t updated our Downstream Sentry yet.
Then the extract runs and calls the API on the Extract Sentry to say that everything is Happy. But, first it consults Upstream Sentries to find the latest state value, and uses this for the Hoot, hence making it Sick.
Once the Data Pipeline Sentry turns back Happy, this will propagate with the Downstream Hoots when an API request is made to the Downstream Sentry.
Conclusion
This was a simple example using one Upstream Sentry. You can actually attach multiple Upstream Sentries and each of these can have Upstream Sentries of their own. Effectively you can have a whole graph of Sentries attached to your Hoots. If you want to get very granular, feel free to add many Upstream Sentry. But if you just need a few check points, you do not have to add these just for completeness sake. It is probably good to start small and simple, and then build up to the more complex cases as you get the hang of things.