HONEYCOMB WITH SWAMP
Swamp manages Honeycomb configuration through the Honeycomb v1 Configuration API. SLOs, the derived columns that act as their SLIs, burn alerts, queries, query annotations and triggers are created and changed by running methods on a behavior. The same commands work from a terminal, a workflow or an agent.
Get started
curl -fsSL https://swamp-club.com/install.sh | sh swamp repo init swamp extension pull @hivemq/honeycombThe @hivemq/honeycomb extension provides this. It contains two behavior types:
@hivemq/honeycombworks with one dataset at a time, set by thedatasetSlugglobal argument. Its methods create and update SLOs and SLI derived columns, add and remove exhaustion-time and budget-rate burn alerts, create queries and query annotations, and create, refresh, update and delete triggers.@hivemq/honeycomb/datasetsworks across a whole team. Its methods find datasets that have had no writes for a given number of days, or whose names match pentester probe patterns. It can list them for review or delete them.
Both types authenticate with a Honeycomb Configuration Key, which is sent as the
X-Honeycomb-Team header, and a region argument that selects the us or eu
instance. The key is kept in a vault and referenced with
${{ vault.get('honeycomb', 'config-key') }}, so it does not appear in any
behavior definition. Storing Secrets covers
how vaults work.
Each run records what it changed as a resource, for example slo,
derivedColumn, burnAlert, trigger or datasetCleanupRun. You can query
these resources as Swamp data. Later runs
also read them: the burn alert delete methods get the alert ID from the stored
burnAlert resource, and the SLO ID that createSlo returns is kept in the
slo resource.
To start, follow the getting started tutorial. It creates a derived column and a 99.9 percent SLO for a checkout dataset. Once an SLO exists, you can add burn rate alerts to it. Query thresholds use triggers. Unused datasets are removed with the dataset cleanup guide. Some methods can safely run more than once and some cannot. Understanding Honeycomb automation in Swamp explains why and how the methods fit into workflows.
Honeycomb documentation
Getting started with Honeycomb SLOs in Swamp
Pull the @hivemq/honeycomb extension, store a Configuration Key in a vault, and create a derived column SLI and an SLO for one Honeycomb dataset with Swamp.
Tutorials →Alert on a Honeycomb query with a trigger
Create a Honeycomb trigger from an inline query spec with a Swamp behavior, then refresh its local state and change its threshold without recreating it.
How-to Guides →Add burn rate alerts to a Honeycomb SLO
Attach an exhaustion-time burn alert and a budget-rate burn alert to an existing Honeycomb SLO, routing notifications to Slack channel and email recipients.
How-to Guides →Clean up stale and spammy Honeycomb datasets
Preview and then delete Honeycomb datasets with no recent writes or with pentester probe names, using the @hivemq/honeycomb/datasets behavior type in Swamp.
How-to Guides →Honeycomb extensions
Every Swamp extension for Honeycomb: behavior types, global arguments, methods, vault configuration and the data each one writes, read from the registry.
Reference →Understanding Honeycomb automation in Swamp
How the @hivemq/honeycomb behavior types map SLOs, derived columns, burn alerts, queries and triggers onto Swamp behaviors, vaults, data and workflows.
Explanation →