Skip to content

[BUILD] Fix benchmark genrule capturing stderr into JSON output#3925

Merged
ThomsonTan merged 3 commits intoopen-telemetry:mainfrom
ThomsonTan:fix_benchmark_warning
Mar 12, 2026
Merged

[BUILD] Fix benchmark genrule capturing stderr into JSON output#3925
ThomsonTan merged 3 commits intoopen-telemetry:mainfrom
ThomsonTan:fix_benchmark_warning

Conversation

@ThomsonTan
Copy link
Copy Markdown
Contributor

@ThomsonTan ThomsonTan commented Mar 11, 2026

Fixes #3926

Changes

The otel_cc_benchmark genrule used &> to redirect both stdout and
stderr into the _result.json file. SDK warnings (e.g.,
WarnOnDuplicateInstrument from measurements_benchmark) written to stderr
corrupt the JSON, causing gojq to fail with "invalid json" in CI.

Change &> $@ to > $@ 2>/dev/null so only stdout (benchmark JSON) is
captured; stderr diagnostics are discarded.

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

@ThomsonTan ThomsonTan requested a review from a team as a code owner March 11, 2026 23:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.06%. Comparing base (bef0b90) to head (61e62c1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3925   +/-   ##
=======================================
  Coverage   90.06%   90.06%           
=======================================
  Files         226      226           
  Lines        7223     7223           
=======================================
  Hits         6505     6505           
  Misses        718      718           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ThomsonTan ThomsonTan merged commit 6285a72 into open-telemetry:main Mar 12, 2026
68 checks passed
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.

Benchmark failure in CI

2 participants