Skip to content

test(profiling): AgentPhase tag visible on CPU execution samples#574

Draft
jbachorik wants to merge 1 commit into
jb/llm-jp-1-enumfrom
jb/llm-jp-2-test
Draft

test(profiling): AgentPhase tag visible on CPU execution samples#574
jbachorik wants to merge 1 commit into
jb/llm-jp-1-enumfrom
jb/llm-jp-2-test

Conversation

@jbachorik
Copy link
Copy Markdown
Collaborator

@jbachorik jbachorik commented Jun 2, 2026

What does this PR do?:
Adds AgentPhaseProfilingTest to ddprof-test. The test registers llm.agent.phase as a custom attribute slot, sets AWAITING_INFERENCE on a worker thread burning CPU, and asserts that at least one datadog.ExecutionSample JFR event carries the phase tag value by name.

Motivation:
End-to-end verification that the tag encoding flows through writeCurrentContext() and surfaces with the correct field name in JFR. This satisfies the "open verification" item in the spec.

Additional Notes:

  • Stacked on: feat(profiling): add AgentPhase enum and ContextSetter.readContextValue #573 (AgentPhase enum).
  • Run with ./gradlew :ddprof-test:testRelease --tests "com.datadoghq.profiler.llm.AgentPhaseProfilingTest".
  • Note from implementation: JFR field name is the raw attribute name "llm.agent.phase" (no dot→underscore transformation), and AbstractProfilerTest requires overriding getProfilerCommand() to include attributes=llm.agent.phase.

How to test the change?:

./gradlew :ddprof-test:testRelease --tests "com.datadoghq.profiler.llm.AgentPhaseProfilingTest"

For Datadog employees:

  • This PR doesn't touch any of that.
  • JIRA: PROF-14860

@jbachorik jbachorik added the AI label Jun 2, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Jun 2, 2026

CI Test Results

Run: #26822354163 | Commit: 99a8947 | Duration: 14m 32s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-06-02 13:36:13 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant