Skip to content

test: cover OTel metrics ForceFlush and Shutdown - #7606

Draft
bm1549 wants to merge 1 commit into
mainfrom
brian.marks/otel-metrics-lifecycle
Draft

test: cover OTel metrics ForceFlush and Shutdown#7606
bm1549 wants to merge 1 commit into
mainfrom
brian.marks/otel-metrics-lifecycle

Conversation

@bm1549

@bm1549 bm1549 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Motivation

Link (AppGate required)

Short-lived processes can exit before the OTel metrics export interval. Tracers need one shared contract proving that ForceFlush and Shutdown export pending metrics before they return.

Changes

  • Add lifecycle endpoints to the Python, Java, and Node.js parametric apps.
  • Add ForceFlush and Shutdown tests that record a DELTA counter, invoke the public lifecycle API, kill the app, and read the exported payload once without polling.
  • Keep the existing Java internal flush endpoint for compatibility while requiring the public API in the new test.
  • Record unreleased or unsupported implementations in the tracer manifests.

Local matrix:

  • Python 4.14.0: 2 passed.
  • Java 1.66.0-SNAPSHOT: 2 XPASS.
  • Node.js 7.0.0-pre: 2 XPASS.

Companion PRs: Java #12317, Node.js #10023, and documentation #39515.

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? No.
    • No build-XXX-image label is needed.
  • A scenario is added, removed or renamed? No.
    • No scenario-level R&P review is needed.

The parametric app endpoints are modified, so the first reviewer item remains open for R&P approval.

@bm1549 bm1549 added the ai-generated The pull request includes a significant amount of AI-generated code label Aug 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/dotnet.yml                                                    @DataDog/system-tests-reviewers
manifests/golang.yml                                                    @DataDog/system-tests-reviewers
manifests/java.yml                                                      @DataDog/system-tests-reviewers
manifests/nodejs.yml                                                    @DataDog/system-tests-reviewers
manifests/ruby.yml                                                      @DataDog/system-tests-reviewers
manifests/rust.yml                                                      @DataDog/system-tests-reviewers
tests/parametric/test_otel_metrics.py                                   @DataDog/system-tests-core @DataDog/apm-sdk-capabilities
utils/build/docker/java/parametric/src/main/java/com/datadoghq/trace/opentelemetry/controller/OpenTelemetryMetricsController.java  @DataDog/system-tests-reviewers
utils/build/docker/java/parametric/src/main/java/com/datadoghq/trace/opentelemetry/dto/FlushArgs.java  @DataDog/system-tests-reviewers
utils/build/docker/nodejs/parametric/server.js                          @DataDog/system-tests-reviewers
utils/build/docker/python/parametric/apm_test_client/server.py          @DataDog/system-tests-reviewers
utils/docker_fixtures/_test_clients/_test_client_parametric.py          @DataDog/system-tests-core

@datadog-official

datadog-official Bot commented Aug 27, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 1 Pipeline job failed

Testing the test | all-jobs-are-green

View more details · View in GitHub Actions

Job did not complete due to ongoing mergegate checks that were still running.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

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

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

Labels

ai-generated The pull request includes a significant amount of AI-generated code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant