Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use empty resource when RecordFactory.Resource is nil #5264

Merged
merged 6 commits into from Apr 28, 2024

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Apr 25, 2024

When testing, a dev will expect a zero value when they provide a zero value. Do not use the default resource from the SDK when the zero value of the Resource field is provided.

@MrAlias MrAlias added pkg:testing Related to testing or a testing package pkg:SDK Related to an SDK package area:logs Part of OpenTelemetry logs labels Apr 25, 2024
@MrAlias MrAlias added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Apr 25, 2024
@MrAlias MrAlias marked this pull request as ready for review April 25, 2024 16:04
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.4%. Comparing base (c9c1503) to head (3dc4a61).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #5264     +/-   ##
=======================================
- Coverage   84.4%   84.4%   -0.1%     
=======================================
  Files        265     265             
  Lines      17477   17480      +3     
=======================================
+ Hits       14755   14757      +2     
- Misses      2411    2412      +1     
  Partials     311     311             
Files Coverage Δ
sdk/log/logtest/factory.go 85.7% <100.0%> (+1.0%) ⬆️

... and 1 file with indirect coverage changes

@dmathieu
Copy link
Member

Should there be a test?

@pellared pellared merged commit 9794825 into open-telemetry:main Apr 28, 2024
27 checks passed
@MrAlias MrAlias added this to the v1.27.0 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs pkg:SDK Related to an SDK package pkg:testing Related to testing or a testing package Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants