Skip to content

Remove redundant Resource.Empty fallback in GetResource() calls#3806

Merged
rajkumar-rangaraj merged 2 commits intoopen-telemetry:mainfrom
rajkumar-rangaraj:rajrang/fixResEmpty
Jan 23, 2026
Merged

Remove redundant Resource.Empty fallback in GetResource() calls#3806
rajkumar-rangaraj merged 2 commits intoopen-telemetry:mainfrom
rajkumar-rangaraj:rajrang/fixResEmpty

Conversation

@rajkumar-rangaraj
Copy link
Member

Fixes ##3646 (comment)
Design discussion issue #

Changes

Please provide a brief description of the changes here.

Removed the redundant ?? Resource.Empty null-coalescing and ?. null-conditional operators when calling GetResource() on ParentProvider in:

  • GenevaLogExporter.cs
  • GenevaTraceExporter.cs

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)

@rajkumar-rangaraj rajkumar-rangaraj requested a review from a team as a code owner January 23, 2026 18:20
@github-actions github-actions bot requested a review from xiang17 January 23, 2026 18:20
@github-actions github-actions bot added the comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva label Jan 23, 2026
@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.91%. Comparing base (e15516e) to head (3aeb5b4).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3806      +/-   ##
==========================================
+ Coverage   71.87%   71.91%   +0.04%     
==========================================
  Files         457      447      -10     
  Lines       17843    17792      -51     
==========================================
- Hits        12825    12796      -29     
+ Misses       5018     4996      -22     
Flag Coverage Δ
unittests-Exporter.Geneva 54.15% <100.00%> (-0.33%) ⬇️
unittests-Instrumentation.Cassandra ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...OpenTelemetry.Exporter.Geneva/GenevaLogExporter.cs 90.38% <100.00%> (ø)
...enTelemetry.Exporter.Geneva/GenevaTraceExporter.cs 86.04% <100.00%> (ø)

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rajkumar-rangaraj rajkumar-rangaraj added this pull request to the merge queue Jan 23, 2026
Merged via the queue into open-telemetry:main with commit a09fe9c Jan 23, 2026
78 checks passed
@rajkumar-rangaraj rajkumar-rangaraj deleted the rajrang/fixResEmpty branch January 23, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants