Skip to content

test(otel): fix gRPC assertion in OTLP traces protocol test - #8072

Open
vpellan wants to merge 1 commit into
mainfrom
vpellan/java-otlp-traces-grpc-protocol
Open

vpellan wants to merge 1 commit into
mainfrom
vpellan/java-otlp-traces-grpc-protocol

Conversation

@vpellan

@vpellan vpellan commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Motivation

Test_OTEL_EXPORTER_OTLP_TRACES_PROTOCOL::test_grpc_protocol_is_used_for_trace_export was declared incomplete_test_app for Java, but it could not pass for any library: the test agent's gRPC listener forwards each export to its own HTTP /v1/traces endpoint with Content-Type: application/x-protobuf, while the test expected application/grpc.

Changes

  • Test: for gRPC, a delivered export is now the pass condition. The endpoint fixture points at the agent's gRPC-only port, so an export only arrives there over gRPC. This is the same approach test_otel_exporter_otlp_protocol.py already uses. The unused application/grpc content-type entry is removed. HTTP assertions are unchanged.
  • Java manifest: incomplete_test_app → bug (APMAPI-2503). With the test fixed, Java fails on a real tracer bug: OtlpGrpcSender does not send the te: trailers header that gRPC requires, and the Datadog OkHttp fork (3.12.15) drops te from every HTTP/2 request anyway. The test agent's gRPC server then resets the stream (StreamResetException: stream was reset: INTERNAL_ERROR in the tracer logs). Reproduced with curl against the same agent: the same reset without te: trailers, grpc-status: 0 with it. APMAPI-2503 already tracks the Java gRPC failures for metrics and logs, which use the same sender.

Locally with TEST_LIBRARY=java: 4 passed, 1 xfailed. No tracer currently exports traces over gRPC, so the new gRPC pass path has only been checked with a hand-sent gRPC export through the test agent.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Tests, manifest, weblog are modified -> you'll need a review from system-tests-reviewers: ask to one of youre co-worker familiar with the tested feature.
    • Framework is modified, or non obvious usage of it -> get a review from system-tests-core (slack)

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

🛟 #apm-shared-testing 🛟

🤖 Generated with Claude Code

The test agent's gRPC listener forwards decoded payloads to its HTTP
/v1/traces endpoint with an application/x-protobuf content type, so the
application/grpc check could never pass. Treat delivery through the
gRPC-only port as proof of gRPC, as test_otel_exporter_otlp_protocol.py
already does.

Java now runs the test and fails on a real tracer bug: OkHttp 3.12.15
drops the required `te: trailers` header, so the gRPC server resets the
stream. Declare it as bug (APMAPI-2503) instead of incomplete_test_app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/java.yml                                                      @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_traces_protocol.py  @DataDog/system-tests-reviewers

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3c0e861 | Docs | View more details | Give us feedback!

@vpellan
vpellan marked this pull request as ready for review October 16, 2026 14:34
@vpellan
vpellan requested a review from a team as a code owner October 16, 2026 14:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T14:36:40.139282Z 3c0e861 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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