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

docs: Add ADR dir and error handling ADR #2664

Merged
merged 11 commits into from
Mar 6, 2025

Conversation

scottgerring
Copy link
Contributor

@scottgerring scottgerring commented Feb 14, 2025

Fixes #2571

Capturing decision record for error handling in repo with new docs.

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)

@scottgerring scottgerring marked this pull request as ready for review February 14, 2025 09:59
@scottgerring scottgerring requested a review from a team as a code owner February 14, 2025 09:59
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.6%. Comparing base (b33f0cc) to head (6ec00ae).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2664   +/-   ##
=====================================
  Coverage   79.6%   79.6%           
=====================================
  Files        123     123           
  Lines      23034   23034           
=====================================
  Hits       18356   18356           
  Misses      4678    4678           

☔ View full report in Codecov by Sentry.
📢 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.

@scottgerring
Copy link
Contributor Author

@cijothomas re-wrote a bunch to reflect discussion and current state!

@scottgerring
Copy link
Contributor Author

@cijothomas is this good to merge? It'd be great to have a concrete example in place so we can start to follow the pattern - for instance for the tracing interop Björn is working on

@scottgerring
Copy link
Contributor Author

As discussed @cijothomas i've made this super prescriptive guidance now, and linked out to the ADR-format discussion for more detail.

### 2. Consolidate error types within a trait where we can, let them diverge when we can't**

We aim to consolidate error types where possible _without indicating a function may return more errors than it can actually return_.
Here's an example:
Copy link
Member

Choose a reason for hiding this comment

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

Agree with the content, but code example is not intuitive. May I suggest a pattern like
"don't do this"
show bad code
"instead, do this"
show correct one.

I think such a pattern makes it easier to follow.

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.

LGTM. Great start to following this practice throughout.

Left some small comments. Would love to get one more eyes to review!

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM with nit comments. Thanks for adding this ADR, definitely bring clarity in our error handling design.

cijothomas and others added 4 commits March 3, 2025 10:38
Co-authored-by: Zhongyang Wu <zhongyang.wu@outlook.com>
Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
@scottgerring
Copy link
Contributor Author

@cijothomas went through all the comments again, should be good!

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.

Thanks!

@cijothomas cijothomas merged commit 69c4ade into open-telemetry:main Mar 6, 2025
23 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.

Error handling ADR
4 participants