Skip to content

Add LLMObs integration tests for Java#6364

Open
ygree wants to merge 19 commits intomainfrom
ygree/openai-java-tests
Open

Add LLMObs integration tests for Java#6364
ygree wants to merge 19 commits intomainfrom
ygree/openai-java-tests

Conversation

@ygree
Copy link
Contributor

@ygree ygree commented Feb 20, 2026

Motivation

Add support for system LLMObs tests for Java OpenAI SDK, covering chat completions, tool calls, responses API, and embedding interactions.
Add support for parametric LLMObs manual API tests for Java.

Changes

  • Add a new Java test app (openai_app) built with Gradle/Javalin that implements OpenAI proxy endpoints for
    testing
  • Add openai-java.Dockerfile to build and run the Java test app with dd-java-agent
  • Bump dd-apm-test-agent from v1.38.0 to v1.42.0
  • Add support for /evp_proxy/v4 endpoint in llmobs_requests(); add gzip decompression and MessagePack
    decoding for Java tracer payloads

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@ygree ygree self-assigned this Feb 20, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2026

CODEOWNERS have been resolved as:

tests/integration_frameworks/utils/vcr-cassettes/openai/test_chat_completion_stream_False_openai_chat_completions_post_424f6218.json  @DataDog/system-tests-core
tests/integration_frameworks/utils/vcr-cassettes/openai/test_chat_completion_tool_call_stream_False_openai_chat_completions_post_ec6364ef.json  @DataDog/system-tests-core
tests/integration_frameworks/utils/vcr-cassettes/openai/test_embedding_openai_embeddings_post_e8a65512.json  @DataDog/system-tests-core
tests/integration_frameworks/utils/vcr-cassettes/openai/test_responses_create_stream_False_openai_responses_post_661cf6eb.json  @DataDog/system-tests-core
utils/build/docker/java/openai-java.Dockerfile                          @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/openai_app/.gitignore                           @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/openai_app/build.gradle                         @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/openai_app/gradle/wrapper/gradle-wrapper.jar    @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/openai_app/gradle/wrapper/gradle-wrapper.properties  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/openai_app/gradlew                              @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/openai_app/settings.gradle                      @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/openai_app/src/main/java/SingleFileServer.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/openai_app/system_tests_library_version.sh      @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/parametric/src/main/java/com/datadoghq/trace/controller/LlmObsController.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
tests/integration_frameworks/llm/openai/test_openai_llmobs.py           @DataDog/ml-observability
tests/integration_frameworks/llm/utils.py                               @DataDog/ml-observability
utils/_context/_scenarios/integration_frameworks.py                     @DataDog/system-tests-core
utils/_context/_scenarios/parametric.py                                 @DataDog/system-tests-core
utils/docker_fixtures/_test_agent.py                                    @DataDog/system-tests-core
utils/scripts/ci_orchestrators/workflow_data.py                         @DataDog/system-tests-core

@ygree ygree force-pushed the ygree/openai-java-tests branch 2 times, most recently from 335d036 to 5e40f8a Compare February 21, 2026 00:03
@datadog-official
Copy link

datadog-official bot commented Feb 21, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 42 Tests failed

tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots.test_mix_snapshot[uds] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: assert 'Snapshot was not received' is None
 +  where 'Snapshot was not received' = <built-in method join of str object at 0x7fdf27e2b720>(['Snapshot was not received'])
 +    where <built-in method join of str object at 0x7fdf27e2b720> = '\n'.join
 +    and   ['Snapshot was not received'] = <tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots object at 0x7fdf19ca1040>.setup_failures

self = <tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots object at 0x7fdf19ca1040>

    def test_mix_snapshot(self):
>       self._assert()

...
tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM.test_log_method_snapshot[poc] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: assert 'Snapshot was not received' is None
 +  where 'Snapshot was not received' = <built-in method join of str object at 0x7f43aba2b720>(['Snapshot was not received'])
 +    where <built-in method join of str object at 0x7f43aba2b720> = '\n'.join
 +    and   ['Snapshot was not received'] = <tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM object at 0x7f439d96c320>.setup_failures

self = <tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM object at 0x7f439d96c320>

    def test_log_method_snapshot(self):
>       self._assert()

...
tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM.test_log_method_snapshot[spring-boot-openliberty] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: assert 'Snapshot was not received' is None
 +  where 'Snapshot was not received' = <built-in method join of str object at 0x7f270a42b720>(['Snapshot was not received'])
 +    where <built-in method join of str object at 0x7f270a42b720> = '\n'.join
 +    and   ['Snapshot was not received'] = <tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM object at 0x7f27002b3cb0>.setup_failures

self = <tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM object at 0x7f27002b3cb0>

    def test_log_method_snapshot(self):
>       self._assert()

...
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a8b160e | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@ygree ygree force-pushed the ygree/openai-java-tests branch from 5e40f8a to 53695b1 Compare February 21, 2026 00:35
output_tokens n/a thus not set
java uses base64 encoding format instead of float
@ygree ygree changed the title openai-java tests Add LLMObs integration tests for Java OpenAI SDK Mar 6, 2026
@ygree
Copy link
Contributor Author

ygree commented Mar 17, 2026

@codex review

Copy link

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

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: 5d0c54e45c

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ygree ygree changed the title Add LLMObs integration tests for Java OpenAI SDK Add LLMObs integration tests for Java SDK Mar 18, 2026
@ygree ygree changed the title Add LLMObs integration tests for Java SDK Add LLMObs integration tests for Java Mar 18, 2026
@ygree ygree marked this pull request as ready for review March 18, 2026 02:12
@ygree ygree requested review from a team as code owners March 18, 2026 02:12
Copy link

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

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: 0289d40807

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

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

You need to add the new weblog in integration_frameworks_weblogs here : utils/scripts/ci_orchestrators/workflow_data.py

ygree added 2 commits March 19, 2026 09:50
- Add openai-java@4.29.0 to integration_frameworks weblogs map
- Enables CI to run integration tests for Java OpenAI SDK

Rationale: New openai-java weblog was added to the repo and needs to be registered in CI orchestration

This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md)
@ygree ygree changed the title Add LLMObs integration tests for Java Add LLMObs integration tests for Java [java@ygree/llmobs-systest-fixes] Mar 19, 2026
@ygree ygree requested a review from cbeauchesne March 19, 2026 23:16
@ygree ygree changed the title Add LLMObs integration tests for Java [java@ygree/llmobs-systest-fixes] Add LLMObs integration tests for Java [java@661ea70f3f531dc34e6edb4ed185cb8d509187d7] Mar 20, 2026
Copy link
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

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

CI is failing. Feel free to ping me on slack if you need some help.

@ygree
Copy link
Contributor Author

ygree commented Mar 24, 2026

CI is failing. Feel free to ping me on slack if you need some help.

Two tests were expected to fail because the corresponding Java changes haven't been released yet. I changed the manifest so that they would be expected to fail until the next minor version.

@ygree ygree requested a review from cbeauchesne March 24, 2026 17:56
@ygree ygree changed the title Add LLMObs integration tests for Java [java@661ea70f3f531dc34e6edb4ed185cb8d509187d7] Add LLMObs integration tests for Java Mar 24, 2026
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