Skip to content

Add in LLM Observability Prompt Tracking API - #12161

Open
sabrenner wants to merge 4 commits into
masterfrom
sabrenner/llmobs-manual-prompt-tracking
Open

Add in LLM Observability Prompt Tracking API#12161
sabrenner wants to merge 4 commits into
masterfrom
sabrenner/llmobs-manual-prompt-tracking

Conversation

@sabrenner

@sabrenner sabrenner commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Adds a manual prompt track API for the LLM Observability SDK. This works by exposing a prompt object builder to pass in to a new annotatePrompt method. This method only applies the prompt annotation on LLM spans.

Motivation

Further support parity with Node.js and Python SDKs.

Additional Notes

We'll need to follow up with allowing these to be annotated on auto-instrumented LLM spans (ie OpenAI)

Contributor Checklist

Jira ticket: MLOB-7901

@sabrenner sabrenner added type: feature Enhancements and improvements comp: mlobs ML Observability (LLMObs) labels Aug 7, 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: 21b2f2e0ba

ℹ️ 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".

Comment thread dd-trace-api/src/main/java/datadog/trace/api/llmobs/LLMObs.java
@sabrenner

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 866782e2d6

ℹ️ 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-us1-prod

datadog-datadog-us1-prod Bot commented Aug 7, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 87.31%
Overall Coverage: 57.53% (-0.41%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: dbe9f51 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

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.82 s 14.73 s [-0.3%; +1.5%] (no difference)
startup:insecure-bank:tracing:Agent 13.70 s 13.73 s [-1.0%; +0.5%] (no difference)
startup:petclinic:appsec:Agent 17.43 s 17.35 s [-0.5%; +1.4%] (no difference)
startup:petclinic:iast:Agent 16.88 s 17.48 s [-8.9%; +2.1%] (unstable)
startup:petclinic:profiling:Agent 16.55 s 17.50 s [-9.7%; -1.1%] (significantly better)
startup:petclinic:sca:Agent 17.22 s 17.16 s [-0.7%; +1.4%] (no difference)
startup:petclinic:tracing:Agent 16.45 s 16.73 s [-2.8%; -0.5%] (maybe better)

Commit: dbe9f517 · 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
sabrenner marked this pull request as ready for review August 7, 2026 18:33
@sabrenner
sabrenner requested review from a team as code owners August 7, 2026 18:33
@sabrenner
sabrenner requested a review from ygree August 7, 2026 18:33

@datadog-datadog-us1-prod datadog-datadog-us1-prod 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.

Datadog Autotest: FAIL

A later prompt annotation that only adds version or tags silently resets custom RAG context and query variable keys to defaults, corrupting tracking classification for applications that enrich a prompt across multiple calls.

📊 Validated against 7 scenarios · Open Bits AI session

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

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.

1 participant