Skip to content

Add LLMObs integration tests for Java#6364

Merged
ygree merged 23 commits into
mainfrom
ygree/openai-java-tests
Mar 26, 2026
Merged

Add LLMObs integration tests for Java#6364
ygree merged 23 commits into
mainfrom
ygree/openai-java-tests

Conversation

@ygree

@ygree ygree commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

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

datadog-official Bot commented Feb 21, 2026

Copy link
Copy Markdown

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2186eba | 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

ygree commented Mar 17, 2026

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: 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".

Comment thread manifests/java.yml
Comment thread tests/integration_frameworks/llm/openai/test_openai_llmobs.py Outdated
@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

@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: 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".

Comment thread utils/build/docker/java/openai-java.Dockerfile Outdated
Comment thread utils/build/docker/java/openai_app/src/main/java/SingleFileServer.java Outdated
Comment thread tests/integration_frameworks/llm/openai/test_openai_llmobs.py

@cbeauchesne cbeauchesne left a comment

Copy link
Copy Markdown
Collaborator

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

@cbeauchesne cbeauchesne left a comment

Copy link
Copy Markdown
Collaborator

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

ygree commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

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

@cbeauchesne 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
Comment thread utils/_context/_scenarios/integration_frameworks.py Outdated
Remove self.environment["DD_TRACE_DEBUG"] = "true"; it is configured separately.
@ygree ygree enabled auto-merge (squash) March 25, 2026 22:09
@ygree ygree merged commit 0364c6e into main Mar 26, 2026
3382 of 3384 checks passed
@ygree ygree deleted the ygree/openai-java-tests branch March 26, 2026 03:53
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