Skip to content

Conversation

@owent
Copy link
Member

@owent owent commented Nov 29, 2025

Fixes #3721

Changes

  • Allow retryable exports or split them into two batch jobs for OTLP HTTP exporters.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

Copilot AI review requested due to automatic review settings November 29, 2025 04:32
@owent owent requested a review from a team as a code owner November 29, 2025 04:32
Copilot finished reviewing on behalf of owent November 29, 2025 04:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modifies OTLP HTTP exporter tests to support multiple export attempts in unit tests, addressing issue #3721. The changes enable tests to handle retryable exports or split batch jobs.

Key Changes

  • Changed mock expectations from .WillOnce() to .WillRepeatedly() to allow multiple export invocations
  • Added early-return guards to handle empty payloads gracefully
  • Introduced counter validation to ensure at least one successful export occurred

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 14 comments.

File Description
exporters/otlp/test/otlp_http_metric_exporter_test.cc Updated 6 test methods to support retryable metric exports with counter validation
exporters/otlp/test/otlp_http_log_record_exporter_test.cc Updated 4 test methods to support retryable log exports with counter validation
exporters/otlp/test/otlp_http_exporter_test.cc Updated 4 test methods to support retryable trace exports with counter validation

@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.95%. Comparing base (9de3493) to head (ab78ffb).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3771      +/-   ##
==========================================
+ Coverage   89.93%   89.95%   +0.02%     
==========================================
  Files         225      225              
  Lines        7158     7158              
==========================================
+ Hits         6437     6438       +1     
+ Misses        721      720       -1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

[TEST] Test failure in OtlpHttpExporterTestPeer.ExportJsonIntegrationTestSync

1 participant