Restructure step metadata docs into reference page#1510
Restructure step metadata docs into reference page#1510Benanna2019 wants to merge 7 commits intomainfrom
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
djfarrelly
left a comment
There was a problem hiding this comment.
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.
pages/docs/features/inngest-functions/steps-workflows/metadata.mdx
Outdated
Show resolved
Hide resolved
| | *(omitted or `"default"`)* | `userland.default` | User Metadata | | ||
| | `"billing"` | `userland.billing` | User Metadata (billing) | | ||
| | `"analytics"` | `userland.analytics` | User Metadata (analytics) | |
There was a problem hiding this comment.
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.
| ## Viewing metadata in the dashboard | ||
|
|
||
| Metadata is displayed in the **trace detail panel** when you select a span in the function run timeline. | ||
|
|
||
|  | ||
|
|
||
| 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 | ||
|
|
||
|  |
There was a problem hiding this comment.
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
|
|
||
|  | ||
|
|
||
| ## How it works |
There was a problem hiding this comment.
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.
File has moved to pages/docs/reference/typescript/v4/functions/metadata.mdx
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()setupstep.metadata()andinngest.metadatamethod tablesThe companion how-to page is in a separate PR.
Relates to DEV-276.
Requested reviewers
@AndyInternet @djfarrelly