Skip to content

Add Support for Annotating Embedding and Retrieval Documents - #12149

Open
sabrenner wants to merge 4 commits into
masterfrom
sabrenner/llmobs-document-io-normalization
Open

Add Support for Annotating Embedding and Retrieval Documents#12149
sabrenner wants to merge 4 commits into
masterfrom
sabrenner/llmobs-document-io-normalization

Conversation

@sabrenner

@sabrenner sabrenner commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Adds proper support for annotating embedding and retrieval documents for LLM Observability spans by adding two new annotateEmbeddingIO(List<LLMObs.Document>, String) and annotateRetrievalIO(String, List<LLMObs.Document>) functions for embedding and retrieval spans respectively.

Motivation

In-parity support with Node.js and Python. Additionally, unblocks proper span processing support in #12112

Additional Notes

Contributor Checklist

Jira ticket: MLOB-7937

@sabrenner sabrenner added type: feature Enhancements and improvements comp: mlobs ML Observability (LLMObs) labels Aug 5, 2026
@sabrenner

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b4184fb6d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@datadog-datadog-prod-us1

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.76 s 14.69 s [-0.6%; +1.6%] (no difference)
startup:insecure-bank:tracing:Agent 13.58 s 13.71 s [-1.8%; -0.1%] (maybe better)
startup:petclinic:appsec:Agent 17.44 s 17.38 s [-0.7%; +1.4%] (no difference)
startup:petclinic:iast:Agent 17.43 s 17.51 s [-1.3%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 17.44 s 17.41 s [-1.0%; +1.4%] (no difference)
startup:petclinic:sca:Agent 17.44 s 17.18 s [+0.5%; +2.5%] (maybe worse)
startup:petclinic:tracing:Agent 16.46 s 16.54 s [-1.6%; +0.6%] (no difference)

Commit: 27cb6073 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@sabrenner

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c241d4eb5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@sabrenner

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 27cb6073be

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@sabrenner
sabrenner marked this pull request as ready for review August 5, 2026 17:41
@sabrenner
sabrenner requested review from a team as code owners August 5, 2026 17:41
@sabrenner
sabrenner requested a review from dougqh August 5, 2026 17:41

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Datadog Autotest: PASS

More details

The embedding and retrieval document paths preserve legacy string behavior while emitting the new document shape, including optional name, id, and score fields. Focused domain and mapper tests passed across legacy, metadata-rich, partial, empty, and invalid-value scenarios; no diff-attributable behavioral regression was found.

Was this helpful? React 👍 or 👎

📊 Validated against 8 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 27cb607 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@ygree ygree left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AnnotateIO taking two arguments does not seem to be a flexible API design. Since we need to add more combinations of different types, we might want to consider splitting it into two separate methods, at least for new methods. WDYT?

@ygree
ygree self-requested a review August 5, 2026 20:34

@ygree ygree left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sabrenner
sabrenner added this pull request to the merge queue Aug 6, 2026
@dd-octo-sts

dd-octo-sts Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Aug 6, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-08-06 14:03:22 UTC ℹ️ Start processing command /merge


2026-08-06 14:03:27 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-08-06 14:17:15 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 76a5bad:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 6, 2026
@sabrenner
sabrenner enabled auto-merge August 6, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: mlobs ML Observability (LLMObs) type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants