Skip to content

[2/2] Expand OTLP metrics temporality preference coverage - #7924

Open
vpellan wants to merge 3 commits into
vpellan/move-otel-metrics-temporality-testsfrom
vpellan/otel-metrics-temporality-preference
Open

vpellan wants to merge 3 commits into
vpellan/move-otel-metrics-temporality-testsfrom
vpellan/otel-metrics-temporality-preference

Conversation

@vpellan

@vpellan vpellan commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

APMAPI-2555: extend the existing three temporality cases to cover the recognized values, parsing, and defaults specified by the OTel metrics exporter specification.

Stack 2/2: depends on #7925, which moves the original code without changing test behavior. Review and merge #7925 first. This PR targets vpellan/move-otel-metrics-temporality-tests so its diff contains the added coverage and related declarations.

Changes

  • Expand coverage from 3 to 16 parameterized cases: Cumulative, Delta, and LowMemory in lowercase, uppercase, and mixed case; explicit empty and invalid input; and separate Datadog-default and OTel-specification-default checks.
  • Assert exported temporality for synchronous/asynchronous counters, up-down counters, and histograms. Keep the original detailed payload assertions in a separate regression method, including gauges, values, attributes, timestamps, and histogram buckets.
  • Neutralize conflicting temporality settings, pin HTTP/protobuf, and disable unrelated metric/log sources. Leave OTEL_TRACES_EXPORTER unset because none disables the entire Node.js tracer, including metrics.
  • Rename the class for the environment variable and associate it with Feature Health 645.
  • Replace the carried-over activation declarations with registry-based support boundaries and narrower declarations for known limitations. PHP is incomplete_test_app because metric instrument endpoints are absent; C/C++ remain missing_feature.
  • Split mixed-case Cumulative and Delta so Ruby can declare only its failing cases. Track .NET, Rust, Python, and Ruby gaps through language subtasks of APMAPI-2562; keep unaffected cases enabled.
  • Fix an unrelated trace-filter race found in CI in a separate commit: wait for the expected trace instead of reading immediately. The C++ failure artifact shows the trace arriving after the empty read, and the same test passes on the base PR.

The registry descriptions are stale: LowMemory works in Node.js, Java, and Ruby (lowercase/uppercase), and PHP source supplies a Datadog Delta default despite the registry listing Cumulative. The local feature-map CSV lacks this newer variable; the exact ticket and live Feature Health entry independently confirm ID 645 and APMAPI-2555.

CI findings and tracking

The CI run on 6edd3f5c9 exposed 22 temporality failures across eight production/development jobs, plus the C++ trace-arrival race. Laravel 11 security build failures were excluded from this work.

Language CI versions Gap Defect
.NET 3.54.0 / 3.55.0 All three LowMemory spellings export Delta for asynchronous counters instead of Cumulative APMAPI-2563
Rust 0.5.2 / 0.5.3-dev+79746e6 Same LowMemory asynchronous-counter gap APMAPI-2564
Python 4.15.4 / 4.16.0-rc1 Invalid input exports Cumulative instead of the unset Delta default APMAPI-2565
Ruby 2.43.0 / 2.44.0-dev Mixed-case Delta/LowMemory and empty/invalid input export Cumulative APMAPI-2566

Nine method-level bug declarations reference these subtasks. Assertions still enforce the specification; documented Datadog-default differences retain their separate declarations.

Validation

  • ./format.sh: passed after the final manifest edits, including typing, import policy, formatting, and manifest validation. The unrelated empty, untracked utils/build/docker/internal_server/app.sh directory was temporarily moved for shellcheck and restored.
  • ./run.sh TEST_THE_TEST: 635 passed, 1 xfailed after the test split and trace-wait fix. Re-ran manifest/convention checks after the final declarations: 33 passed.
  • Python runner: 3.12.4. Targeted PARAMETRIC runs used existing images with --skip-parametric-build.
  • Ruby 2.42.0-dev with the final declarations: 8 passed, 8 expected failures, no ordinary failures. The four new defect cases carry their dedicated bug reference; passing Cumulative/stable/default cases stay enabled.
  • Node.js 7.0.0-pre: 16 passed, 1 expected failure, covering all 16 temporality cases plus the trace-filter test.
  • Earlier targeted checks: Java 1.66.0+a099fffb31 had 15 passed / 1 expected failure; Go had 12 passed / 4 expected failures.
  • .NET, Rust, and Python declarations are based on the linked CI evidence; those language suites were not rerun locally. No C++ image was available locally, so the bounded-wait fix was exercised with Node.js and requires C++ CI confirmation.

No live Feature Health evidence was changed.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/c.yml                                                         @DataDog/system-tests-reviewers
manifests/cpp.yml                                                       @DataDog/system-tests-reviewers
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/php.yml                                                       @DataDog/system-tests-reviewers
manifests/python.yml                                                    @DataDog/system-tests-reviewers
manifests/ruby.yml                                                      @DataDog/system-tests-reviewers
manifests/rust.yml                                                      @DataDog/system-tests-reviewers
tests/parametric/otel_env_vars/test_otel_exporter_otlp_metrics_temporality_preference.py  @DataDog/system-tests-reviewers
tests/parametric/test_trace_filters.py                                  @DataDog/system-tests-reviewers
utils/_features.py                                                      @DataDog/system-tests-core

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Pipelines  Tests

❌ Errors

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

🚦 110 Pipeline jobs failed

Testing the test | System Tests (cpp_httpd, dev) / End-to-end #1 / httpd 1

View more details · View in GitHub Actions

Testing the test | System Tests (cpp_httpd, prod) / End-to-end #1 / httpd 1

View more details · View in GitHub Actions

Testing the test | System Tests (cpp_kong, dev) / End-to-end #1 / kong 1

View more details · View in GitHub Actions

View all 110 failed jobs.

ℹ️ 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: 8b6e312 | Docs | View more details | Give us feedback!

@vpellan
vpellan force-pushed the vpellan/otel-metrics-temporality-preference branch from 29b73e4 to 25f5c05 Compare October 2, 2026 13:50
@vpellan vpellan changed the title Test OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE [2/2] Expand OTLP metrics temporality preference coverage Oct 2, 2026
@vpellan
vpellan changed the base branch from main to vpellan/move-otel-metrics-temporality-tests October 2, 2026 13:50
@vpellan
vpellan added this pull request to stack #7926 October 2, 2026 13:51
@vpellan
vpellan marked this pull request as ready for review October 2, 2026 14:09
@vpellan
vpellan requested review from a team as code owners October 2, 2026 14:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 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-02T14:14:56.579105Z 25f5c05 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.

@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: 25f5c0585e

ℹ️ 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/ruby.yml
Comment on lines +2341 to +2342
? tests/parametric/otel_env_vars/test_otel_exporter_otlp_metrics_temporality_preference.py::Test_OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
: v2.23.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Declare the known Ruby failures in the manifest

In the Ruby 2.42.0-dev validation recorded for this change, DeLtA, mixed-case LowMemory, empty, and invalid inputs all fail, but this class-level activation leaves those cases enabled; only the specification-default and payload methods are deactivated below. Consequently the Ruby parametric job gets four ordinary failures instead of expected failures. Split the mixed-case method if necessary and add narrow manifest declarations for the affected cases before activating the expanded suite.

AGENTS.md reference: AGENTS.md:L33-L35

Useful? React with 👍 / 👎.

@MilanGarnier MilanGarnier left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I'd recommend to also keep the @features.otel_metrics_api decorator and add the env var one next to it

LGTM for what's being tested

@vpellan
vpellan force-pushed the vpellan/otel-metrics-temporality-preference branch from 25f5c05 to 6edd3f5 Compare October 2, 2026 14:39

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.

2 participants