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

feat(ogen): defer recording error metric #1216

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

johnrutherford
Copy link
Contributor

The other server request metrics are already deferred and recorded after the ErrorHandler is called. This change ensures that metrics attributes added from within a custom ErrorHandler will also be used for the 'ogen.server.errors_count' metric.

This ensures that the ErrorHandler will run before the error metric is recorded.
This is also in line when when the other server request metrics are recorded.
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.91%. Comparing base (0ac03cf) to head (d0f6250).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1216      +/-   ##
==========================================
+ Coverage   73.90%   73.91%   +0.01%     
==========================================
  Files         189      189              
  Lines       12730    12730              
==========================================
+ Hits         9408     9410       +2     
+ Misses       2787     2786       -1     
+ Partials      535      534       -1     

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

@ernado ernado merged commit 6a21eec into ogen-go:main Apr 5, 2024
14 checks passed
@johnrutherford johnrutherford deleted the defer-record-error branch April 5, 2024 17:20
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