Skip to content

Restructure step metadata docs into reference page#1510

Open
Benanna2019 wants to merge 7 commits intomainfrom
ben/step-metadata-reference
Open

Restructure step metadata docs into reference page#1510
Benanna2019 wants to merge 7 commits intomainfrom
ben/step-metadata-reference

Conversation

@Benanna2019
Copy link
Copy Markdown
Contributor

Summary

Replaces the single step metadata page from #1498 with a focused reference page following the Diataxis framework. Strips narrative and how-to content, keeping just the API surface:

  • metadataMiddleware() setup
  • step.metadata() and inngest.metadata method tables
  • Scoping rules and auto-detection behavior
  • Custom kinds and built-in metadata kinds
  • Size limits and error codes
  • Limitations

The companion how-to page is in a separate PR.

Relates to DEV-276.

Requested reviewers

@AndyInternet @djfarrelly

Restructures Andy's single metadata.mdx into a dedicated reference
page following Diataxis. Strips narrative and how-to content, keeps
the API surface clean: middleware setup, builder methods, scoping,
custom kinds, built-in kinds, size limits, and limitations.

DEV-276
@Benanna2019 Benanna2019 requested a review from djfarrelly as a code owner March 31, 2026 19:50
@linear
Copy link
Copy Markdown

linear bot commented Mar 31, 2026

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Ready Ready Preview, Comment Apr 1, 2026 5:52pm

Request Review

Copy link
Copy Markdown
Member

@djfarrelly djfarrelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key high level notes and some other questions for if some of this info could be useful elsewhere - generally I like the direction and the split here between this and the guide.

Comment on lines +70 to +72
| *(omitted or `"default"`)* | `userland.default` | User Metadata |
| `"billing"` | `userland.billing` | User Metadata (billing) |
| `"analytics"` | `userland.analytics` | User Metadata (analytics) |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Does the user ever see "userland" in the UI anywhere? I want to make sure that this is not just an internal implementation that we're exposing to our users and it's not visible in the UI.

Comment on lines -250 to -263
## Viewing metadata in the dashboard

Metadata is displayed in the **trace detail panel** when you select a span in the function run timeline.

![Trace view showing metadata in the detail panel](/assets/docs/features/step-metadata/trace-view-overview.png)

Each metadata entry shows:

- **Kind label** -- "User Metadata" for the default kind, or "User Metadata (custom_kind)" for custom kinds
- **Scope** -- The level the metadata is attached to (run, step, or extended\_trace)
- **Updated at** -- Timestamp of when the metadata was last updated
- **Key-value pairs** -- Sorted alphabetically, with special formatting for byte values

![Close-up of metadata key-value display](/assets/docs/features/step-metadata/metadata-detail-closeup.png)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: should this information be added to observability or traces guides in the learn tab? I wonder if this is useful information to describe how there is new trace metadata that can be helpful for debugging there? That may be a good place to surface this


![Close-up of metadata key-value display](/assets/docs/features/step-metadata/metadata-detail-closeup.png)

## How it works
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Is this how it works helpful context anywhere? Maybe it is ok in a reference if someone really needs to understand what options are available and how it technically works.

- Rename from "Step metadata" to "Metadata" per team consensus
- Remove "step" framing from descriptions (metadata attaches to runs)
- Keep "userland" column pending Andy's confirmation on UI visibility
- Note: URL path move to /docs/reference/ is a follow-up

DEV-276
Lead with metadata as a step method alongside step.run, step.sleep,
step.waitForEvent. This makes the memoization ID intuitive (every
step tool takes one) and clarifies that step.metadata creates a step
that attaches metadata, not metadata about a step.

DEV-276
- Add concrete size calculation example ({ "status": "ok" } = ~10 bytes)
- Restore three-call custom kinds example with inline comments showing
  default kind, custom billing kind, and custom analytics kind. Useful
  as reference material for AI and developers.

DEV-276
…tadata

Moves the reference page from the features section to the correct
location alongside other step tool references (step-run, step-sleep, etc.).
Adds a permanent redirect from the old path.
Copy link
Copy Markdown
Member

@djfarrelly djfarrelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with some open questions from the previous review that are non-blocking. The how it works might be for here or the guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants