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

Global error handler cleanup - Metrics View #2249

Merged
merged 8 commits into from
Oct 26, 2024

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Oct 25, 2024

Fixes #
Design discussion issue (if applicable) #

Changes

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@lalitb lalitb requested a review from a team as a code owner October 25, 2024 06:38
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.6%. Comparing base (1a73d52) to head (cd57696).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2249   +/-   ##
=====================================
  Coverage   79.5%   79.6%           
=====================================
  Files        121     121           
  Lines      20950   20938   -12     
=====================================
- Hits       16672   16668    -4     
+ Misses      4278    4270    -8     

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

global::handle_error(MetricsError::Config(format!(
"no criteria provided, dropping view. mask: {mask:?}"
)));
otel_warn!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for a method that returns Result, I don't think there is any need of internal logging. If we really want to do some log, then it should be Debug level.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual error is getting lost in all these cases, as we just return success with empty view.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we always return success, then that looks like a flaw. Since it is not introduced in this PR, lets remove the error logging from here, and put a todo (optional). We need to rework the View and can fix these then.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added TODO, and removed logging.

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cijothomas cijothomas merged commit ed4d379 into open-telemetry:main Oct 26, 2024
24 of 25 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.

2 participants