Skip to content

[MLObs] adding clarification notes about the metrics#35248

Merged
XG-xin merged 3 commits intomasterfrom
xinyuan/metrics-notes
Mar 16, 2026
Merged

[MLObs] adding clarification notes about the metrics#35248
XG-xin merged 3 commits intomasterfrom
xinyuan/metrics-notes

Conversation

@XG-xin
Copy link
Contributor

@XG-xin XG-xin commented Mar 12, 2026

What does this PR do? What is the motivation?

Add clarifications of the metrics parameter in SDK usage doc, explaining the difference between the actual datadog platform metrics.

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:

Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.

AI assistance

Additional notes

@XG-xin XG-xin requested a review from a team as a code owner March 12, 2026 17:17
@github-actions
Copy link
Contributor

Preview links (active after the build_preview check completes)

Modified Files

## Enriching spans

<div class="alert alert-info">
The <code>metrics</code> parameter here refers to numeric values attached as attributes on individual spans — not <a href="/llm_observability/monitoring/metrics/">Datadog platform metrics</a>. Datadog automatically generates platform metrics (such as <code>ml_obs.span.llm.input.tokens</code>) from these span attributes for use in dashboards and monitors.
Copy link
Contributor

Choose a reason for hiding this comment

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

Customers might interpret this as Datadog automatically generating datadog metrics for all numeric values they annotate on span.metrics - can we clarify we only do this for certain token/usage based metrics?


If you're using automatic instrumentation, token and cost metrics appear on your spans automatically. If you're instrumenting manually, follow the guidance below.

<div class="alert alert-info">In this context, "token metrics" and "cost metrics" refer to numeric key-value pairs you attach to spans through the <code>metrics</code> parameter of the <code>LLMObs.annotate()</code> method. These are distinct from <a href="/llm_observability/monitoring/metrics/">LLM Observability metrics</a>, which are Datadog platform metrics automatically generated from your span data for use in dashboards and monitors.</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@cswatt cswatt self-assigned this Mar 12, 2026
@XG-xin XG-xin merged commit 3ab22c8 into master Mar 16, 2026
20 of 21 checks passed
@XG-xin XG-xin deleted the xinyuan/metrics-notes branch March 16, 2026 15:45
ddjessicay added a commit that referenced this pull request Mar 17, 2026
* Add secret ID notes (#35272)

* add notes

* small edit

* Update MCP docs: recommend custom connectors for Claude Desktop & claude.ai (#35285)

* Update MCP docs: recommend custom connectors for Claude Desktop & claude.ai

The local binary is no longer needed for Claude Desktop or claude.ai — both
now support custom connectors with the remote MCP URL natively. Replaces the
stdio/binary setup instructions with a link to the Claude help center guide.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Simplify tab title to just "Claude" to cover all Claude products

Addresses PR feedback — custom connectors work across Claude (web),
Claude Desktop, and Claude Cowork, so "Claude" covers them all.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Say "including Claude Cowork" instead of "including Claude Desktop"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Remove preview feature notice from prompt optimization (#35288)

Removed preview feature notice for Prompt Optimization.

* [DDSQL-1503] Follow-up on dd.logs() description (#35295)

* Update dd.logs description

* Fix spacing

* [MLObs] adding clarification notes about the metrics (#35248)

* adding clairification notes about the metrics

* remove typo newline

* explain the metrics are only generated for certain keys

* [DOCS-13590] Add Fusion setup guide (#35059)

* [DOCS-13590] Add Fusion setup guide

* [DOCS-13590] Update preview callout

* [DOCS-13590] Update preview callout text

* [DOCS-13590] Add validation section

* [DOCS-13590] Add US1-FED site support banner to Oracle Fusion integration setup guide

* [DOCS-13590] Incorporate cswatt's feedback

* [DOCS-13590] Remove ORA_FND_READ_ONLY_ACCESS_ABSTRACT permission

* Remove MCP Server Preview form alert from VS Code & Cursor extension docs (#35303)

Remove 'The Datadog MCP Server is in Preview. Complete this form to request access.'
from both VS Code and Cursor tabs on the IDE plugins page.

Made-with: Cursor

Co-authored-by: Sumedha Mehta <sumedha.mehta@datadoghq.com>

* [DOCS-13433] Fix valid tag characters to include commas (#35249)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Docs13590/fusion integration ga (#35315)

* [DOCS-13590] Remove preview banner and make doc public

* [DOCS-13590] Add Oracle Fusion integration setup guide

* [DOCS-13642] Add US1-FED port restriction note to log forwarding docs (#35313)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update Go Live Debugger page with eBPF limitations (#35310)

* [DOCS-12531] Update integration developers getting started guide (#34741)

* Rewrite requirements and getting-started

* Update links

* Make Vale corrections

* Apply suggestions from code review

Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>
Co-authored-by: Dominic Medina <115744456+dd-dominic@users.noreply.github.com>
Co-authored-by: Eva Parish <eva.parish@datadoghq.com>

---------

Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>
Co-authored-by: Dominic Medina <115744456+dd-dominic@users.noreply.github.com>

* [DOCS-13670] Standardize buffer section in destination docs (#35267)

* [DOCS-13670] Standardize buffer section in destination docs

Replace destination_buffer_numbered with destination_buffer shortcode.

* updates

* small edit

* small edit

* add for splunk hec

* Translation Pipeline PR (#35291)

* Translated file updates

* Translated file updates

* Translated file updates

* fix erroneously translated `tab` shortcodes

* fix malformed link syntax

---------

Co-authored-by: webops-guacbot[bot] <214537265+webops-guacbot[bot]@users.noreply.github.com>
Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>

* Add assets to support the Cdocs stepper (not in use yet) (#35312)

* Sketch in stepper styles

* Tweak styles

* Check off completed steps

* Flesh out example steps

* Make steps searchable

* Nudge elements

* Update example step

* Tweak stepper behavior

* Use a green checkmark circle to mark completed tasks

* Tweak button wording

* Tweak wording

* Tweak stepper line width

* Tweak appearance

* Improve focus visibility

* Improve accessibility

* Improve accessibility

* Tweak checkmark

* Tweak button text size

* Tweak loading behavior

* Button tweaks

* Tweaks

* Update demo markup

* [wip] Incorporate feedback

* Make the clicked step the active step

* Prevent step titles from being hidden under the sticky menu

* Tweak reset behavior

* Style expand/collapse buttons as links

* Improve responsiveness

* Tweak styles

* Tweak icons

* Tweak spacing

* Fix stepper icon URLs

* Tone down expand/collapse toggle styling (#35284)

Reduce visual weight of the expand all / collapse toggle so it reads
as a quiet utility control rather than competing with step titles.

- font-size: 16px → 14px
- font-weight: 600 → 500
- text-transform: uppercase → none (sentence case)
- Add subtle letter-spacing

* Tweaks

* Delete stepper demo file

* Revert changes in package.json

* Implement Codex feedback

* Fix bug

* Update assets/styles/components/_collapsible-section.scss

Co-authored-by: StefonSimmons <57869435+StefonSimmons@users.noreply.github.com>

---------

Co-authored-by: Brett Blue <84536271+brett0000FF@users.noreply.github.com>
Co-authored-by: StefonSimmons <57869435+StefonSimmons@users.noreply.github.com>

* LLM Obs: Move hallucination detection evaluation doc (#35309)

* move hallucination doc

* tweaks

* add back screenshot

* remove usused code

* fixlinks

* Update content/en/llm_observability/evaluations/custom_llm_as_a_judge_evaluations/_index.md

Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>

* add back account

* links

* fix title

* more fixes

---------

Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>

---------

Co-authored-by: May Lee <may.lee@datadoghq.com>
Co-authored-by: Reilly Wood <163153147+rgwood-dd@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Charles Jacquet <charles.jacquet@datadoghq.com>
Co-authored-by: Mariana Dutra <88353514+mariddc@users.noreply.github.com>
Co-authored-by: Xinyuan Guo <xinyuan.guo@datadoghq.com>
Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com>
Co-authored-by: sumedham <87997309+sumedham@users.noreply.github.com>
Co-authored-by: Sumedha Mehta <sumedha.mehta@datadoghq.com>
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
Co-authored-by: Esther Kim <esther.kim@datadoghq.com>
Co-authored-by: ajwerner <awerner32@gmail.com>
Co-authored-by: Eva Parish <eva.parish@datadoghq.com>
Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>
Co-authored-by: Dominic Medina <115744456+dd-dominic@users.noreply.github.com>
Co-authored-by: webops-guacbot[bot] <214537265+webops-guacbot[bot]@users.noreply.github.com>
Co-authored-by: Jen Gilbert <jen.gilbert@datadoghq.com>
Co-authored-by: Brett Blue <84536271+brett0000FF@users.noreply.github.com>
Co-authored-by: StefonSimmons <57869435+StefonSimmons@users.noreply.github.com>
Co-authored-by: Gergely Svigruha <gsvigruha@users.noreply.github.com>
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.

3 participants