Skip to content

Consider documenting arbitrary request metadata propagation (Go contextutils) #5209

Description

@btshrewsbury-viam

Feature

Arbitrary request metadata propagation (announced 2026-06-25). Modules and clients can attach arbitrary key/value metadata to a request context.Context and have it travel automatically across every gRPC hop — from a client, through viam-server, into and between modules — without piggybacking on OpenTelemetry trace IDs. New Go package go.viam.com/rdk/utils/contextutils/metadata with Set / Get / All / Delete.

import "go.viam.com/rdk/utils/contextutils/metadata"

ctx = metadata.Set(ctx, "sanding-pass-id", "abc-123")          // client side
if passID, ok := metadata.Get(ctx, "sanding-pass-id"); ok {     // downstream
    logger.Infof("handling pass %s", passID)
}

Current docs coverage

Not documented (no contextutils / metadata.Set references). Unrelated "propagation" hits are frame-system and OTel trace-context wording.

Verified state / source PRs

  • viamrobotics/rdk#6049 — "RSDK-13144: Client-to-server arbitrary metadata passing via Context" (merged)

Proposed docs work — needs a placement decision (issue-only for now)

This is a low-level Go SDK utility aimed at advanced module developers — arguably godoc/reference territory rather than a standalone docs page. Options for the docs team to choose:

  1. A short subsection on an existing advanced Go modules page (recommended if there's a natural home).
  2. A reference note only.
  3. wontfix — leave it to Go package docs.

Draft LO (if documented): [Apply] Attach key/value metadata to a request context and read it in a downstream module, so application-specific identifiers propagate across gRPC hops without coupling to tracing.

No PR is being opened for this yet — flagging for a human placement call to avoid spawning a thin page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions