Skip to content

docs(observability): document message = dynamic in the instrumentation guide#3707

Open
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-3169-docs
Open

docs(observability): document message = dynamic in the instrumentation guide#3707
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-3169-docs

Conversation

@chet

@chet chet commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Documents the message = dynamic knob added in #3705, next to the existing log = dynamic section in the instrumentation guide.

message = dynamic lets an event choose its log message per instance (typically a match on a #[label] enum) by implementing the new DynamicMessage trait. The entry shows the pattern and adds the guidance to prefer a static message plus a label where the label already names the case.

Split from the code PR (#3705) so the documentation can be reviewed on its own timeline. Part of the instrumentation-coherency initiative (#3169).

…n guide

Add a `message = dynamic` entry to the instrumentation guide, next to the existing `log = dynamic` section: declare it, implement `DynamicMessage`, and the derive routes `Event::message()` through it. Includes the guidance to prefer a static `message` plus a label where the label already names the case, and to use `message = dynamic` only where the wording says something the label does not.

Documents the framework capability added in NVIDIA#3705; kept as its own PR so the code and docs can land on independent timelines.

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet
chet requested a review from polarweasel as a code owner July 18, 2026 16:43
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9deac49f-2edc-4b12-8bd4-2dfa4ec554bd

📥 Commits

Reviewing files that changed from the base of the PR and between d538254 and e8a277e.

📒 Files selected for processing (1)
  • docs/observability/instrumentation.md

Summary by CodeRabbit

  • Documentation
    • Added guidance for handling event messages that vary by outcome.
    • Included a Rust example demonstrating dynamic message selection.
    • Clarified that dynamic log levels and dynamic messages are independent options.
    • Recommended using a static message with a label when the label sufficiently describes the case.

Walkthrough

The instrumentation guide adds guidance for message = dynamic, including a DynamicMessage example with outcome-specific text and clarification that dynamic levels and messages are independent.

Changes

Observability documentation

Layer / File(s) Summary
Dynamic message guidance
docs/observability/instrumentation.md
Documents implementing Event::message() through DynamicMessage, demonstrates conditional messages based on outcome, and recommends static messages with #[label] when labels already represent the case.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • NVIDIA/infra-controller#3705: Implements the DynamicMessage behavior and related derive and rendering changes described by this documentation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed It clearly states the documentation update for message = dynamic in the instrumentation guide.
Description check ✅ Passed It directly describes the new documentation for message = dynamic and its guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

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.

1 participant