Skip to content

[api-logs] Remove unneeded if check in LogRecordAttributeList#6076

Merged
CodeBlanch merged 2 commits intoopen-telemetry:mainfrom
SimonCropp:remove-if-check-in-LogRecordAttributeList
Jan 22, 2025
Merged

[api-logs] Remove unneeded if check in LogRecordAttributeList#6076
CodeBlanch merged 2 commits intoopen-telemetry:mainfrom
SimonCropp:remove-if-check-in-LogRecordAttributeList

Conversation

@SimonCropp
Copy link
Contributor

Fixes #
Design discussion issue #

Changes

remove if (count > 0) in LogRecordAttributeList since above there is

        if (count <= 0)
        {
            return Empty;
        }

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@SimonCropp SimonCropp requested a review from a team as a code owner January 20, 2025 11:40
@github-actions github-actions bot added the pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package label Jan 20, 2025
@CodeBlanch CodeBlanch changed the title remove if check in LogRecordAttributeList [api-logs] Remove unneeded if check in LogRecordAttributeList Jan 21, 2025
@CodeBlanch CodeBlanch merged commit 48e5a08 into open-telemetry:main Jan 22, 2025
39 checks passed
@codecov
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.40%. Comparing base (fdca498) to head (6572399).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6076      +/-   ##
==========================================
+ Coverage   86.38%   86.40%   +0.01%     
==========================================
  Files         257      257              
  Lines       11679    11656      -23     
==========================================
- Hits        10089    10071      -18     
+ Misses       1590     1585       -5     
Files with missing lines Coverage Δ
...c/OpenTelemetry.Api/Logs/LogRecordAttributeList.cs 66.66% <ø> (-2.36%) ⬇️

@SimonCropp SimonCropp deleted the remove-if-check-in-LogRecordAttributeList branch January 22, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants