Skip to content

Assert String-key setAttribute overloads in shared default logger test#8567

Draft
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:test/default-logger-setattribute-overloads
Draft

Assert String-key setAttribute overloads in shared default logger test#8567
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:test/default-logger-setattribute-overloads

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Description

  • AbstractDefaultLoggerTest.buildAndEmit() only exercised the AttributeKey-typed setAttribute, so the six String-key LogRecordBuilder overloads (String, long, int, double, boolean, Value) never ran through the noop delegation path.
  • Add those six overload calls to the existing builder chain, covering the full public LogRecordBuilder attribute surface.
  • Mirrors the sibling base AbstractDefaultTracerTest, which already exercises every String-key SpanBuilder overload.
  • Same coverage fill as merged sibling PR Assert single-arg Logger.isEnabled overload in shared default logger test #8483.

Testing done

  • Coverage fill only; no production code, signature, or public API change.
  • ./gradlew :api:testing-internal:check — passed.
  • ./gradlew :api:all:test --tests DefaultLoggerTest — 3 passed.
  • ./gradlew :api:incubator:test --tests ExtendedDefaultLoggerTest — 4 passed.
  • Both subclasses inherit this base and run the added assertions.
  • No apidiff, no CHANGELOG (internal test module).

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.55%. Comparing base (4d974ba) to head (d70e903).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8567   +/-   ##
=========================================
  Coverage     91.55%   91.55%           
  Complexity    10262    10262           
=========================================
  Files          1013     1013           
  Lines         27102    27102           
  Branches       3182     3182           
=========================================
  Hits          24812    24812           
  Misses         1565     1565           
  Partials        725      725           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

1 participant