Skip to main content

Notes

Alpha

This feature is alpha. Names, fields, and behavior can change or be removed at any time without notice.

A note is text that you write in Liquid. Massdriver puts stash values into the text, then shows the result as markdown.

Where a note showsโ€‹

Pinned toShows on
A projectThe project header, next to the project name
An environmentThe canvas legend
An instanceThe instance's node on the canvas
A line between two instancesThe line on the canvas

Stash valuesโ€‹

Each stash is a namespace. Read a key with bracket access:

{{ instance.stash["schema.version"] }}

Use bracket access for every key. Keys can hold ., /, and -, which dot access cannot read.

The namespaces you can use depend on where the note is pinned.

Pinned toNamespaces
A projectproject
An environmentproject, environment
An instanceproject, environment, component, instance
A lineproject, environment, source, destination

On a line, source is the instance at the start of the line and destination is the instance at the end.

Each namespace also has an id, such as {{ instance.id }}.

Insert a value from the editorโ€‹

The note editor lists the keys in each stash. Choose a stash in the Stash list, for example Instance, Component, Environment, or Project. Click a key to insert its value tag. A JSON entry also shows a button for each top-level field. Click a field to insert a tag for that field, such as {{ instance.stash["md/v1/traffic"].rps }}.

Text and JSON entriesโ€‹

A text entry is a string. A JSON entry is an object, so you can read its fields:

{{ instance.stash["md/v1/traffic"].rps }} requests per second
Notes that use the old keys

Well-known keys now have a version, such as md/v1/traffic instead of md/traffic. Massdriver renamed the stash entries and the inputs of pinned widgets. It did not change the text of notes. A note that reads instance.stash["md/traffic"] now shows nothing. Edit the note and change each old key to its md/v1/ key: md/health, md/usage, md/traffic, md/banner, and md/links.

Missing valuesโ€‹

A key that is missing, expired, or sensitive renders as empty. Use the default filter to show something else:

Owner: {{ instance.stash["owner"] | default: "not set" }}

Use if to show a line only when a value exists:

{% if instance.stash["incident"] %}Incident: {{ instance.stash["incident"] }}{% endif %}

Liquid that works hereโ€‹

  • Output tags: {{ ... }}
  • Tags: if, elsif, else, unless, case, for, assign, capture
  • The standard Liquid filters, such as default, upcase, downcase, round, times, divided_by, plus, minus, date, join, and size

An unknown filter is an error. The note shows the error message in place of the text. include and render are not available.

Markdown outputโ€‹

The output of a note renders as markdown. You can use headings, lists, bold, italics, code, and tables.

  • Links work only with http and https URLs. A link with any other URL shows as plain text. Links open in a new browser tab.
  • Images do not show.
  • Raw HTML does not show.

Cookbookโ€‹

Status line on an instanceโ€‹

Pin to an instance.

mass alpha stash set billing-dev-app.status "healthy"
mass alpha stash set billing-dev-app.version "2.14.0"
**{{ instance.stash["status"] | default: "unknown" | upcase }}** ยท v{{ instance.stash["version"] | default: "?" }}

Connection pool usageโ€‹

Pin to an instance.

mass alpha stash set billing-dev-app.db/connections "42"
mass alpha stash set billing-dev-app.db/max_connections "100"
{% if instance.stash["db/connections"] %}Pool: {{ instance.stash["db/connections"] }} / {{ instance.stash["db/max_connections"] }} connections{% endif %}

Traffic note on a lineโ€‹

Pin to a line. The source instance writes its traffic to its own stash as a JSON entry.

mass alpha stash set billing-dev-app.md/v1/traffic '{"rps": 120.5, "errors_5m": 3, "p95_ms": 84}' --format json --ttl 300
{% assign t = source.stash["md/v1/traffic"] %}
{% if t %}{{ t.rps | round }} rps ยท p95 {{ t.p95_ms }} ms ยท {{ t.errors_5m }} errors in 5 min{% else %}No traffic data{% endif %}

The --ttl 300 flag deletes the entry after 5 minutes. When the writer stops, the note shows "No traffic data". The same entry also draws the traffic widget on the line.

Pin to an environment.

mass alpha stash set billing-dev.oncall "Dana Smith"
mass alpha stash set billing-dev.runbook "https://wiki.example.com/billing/runbook"
### billing dev
- On call: {{ environment.stash["oncall"] | default: "nobody" }}
- [Runbook]({{ environment.stash["runbook"] }})

Release train on a projectโ€‹

Pin to a project.

mass alpha stash set billing.release/train '{"name": "2026.48", "cutoff": "2026-11-28T17:00:00Z", "captain": "Lee"}' --format json
{% assign train = project.stash["release/train"] %}
{% if train %}Train {{ train.name }} ยท cutoff {{ train.cutoff | date: "%b %-d %H:%M" }} ยท {{ train.captain }}{% endif %}

The date filter shows the time in your browser's time zone.

Migration marker from a deployment stepโ€‹

Pin to an instance. A deployment writes the schema version after its migrations run.

mass alpha stash set billing-dev-app.schema.version "42" --label "Schema version"
Schema {{ instance.stash["schema.version"] | default: "unknown" }}