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. Only you can see your notes. For a step-by-step example, see Pin a note.

Where a note showsโ€‹

Pinned toHow to pin itShows on
A projectOn the project page, click + next to the project nameThe project header, as a pin
An environmentRight-click an empty part of the canvas and choose Pin noteThe canvas legend, as a card
An instanceRight-click the instance node and choose Pin noteThe instance node, as a pin
A line between two instancesRight-click the line and choose Pin noteThe line, as a pin

The note editor has a Show on checkbox for the place in the table, a Note field, a Preview of the result, and a list of stash keys. Click Pin to save the note. To change a note, open it with its edit button and click Save.

A note's text is at most 4,096 bytes. The server rejects a longer note.

Stash valuesโ€‹

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

liquid
{{ 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 }}. A field whose name is not a plain identifier uses bracket access, such as {{ instance.stash["stats"]["p95-ms"] }}.

Text and JSON entriesโ€‹

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

liquid
{{ 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:

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

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

liquid
{% 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.

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

Connection pool usageโ€‹

Pin to an instance.

shell
mass alpha stash set billing-dev-app.db/connections "42"
mass alpha stash set billing-dev-app.db/max_connections "100"
liquid
{% 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.

shell
mass alpha stash set billing-dev-app.md/v1/traffic '{"rps": 120.5, "errors_5m": 3, "p95_ms": 84}' --format json --ttl 300
liquid
{% 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.

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

Release train on a projectโ€‹

Pin to a project.

shell
mass alpha stash set billing.release/train '{"name": "2026.48", "cutoff": "2026-11-28T17:00:00Z", "captain": "Lee"}' --format json
liquid
{% 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.

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