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

chore: add gw failure stats #3809

Merged
merged 3 commits into from
Sep 1, 2023
Merged

chore: add gw failure stats #3809

merged 3 commits into from
Sep 1, 2023

Conversation

cisse21
Copy link
Member

@cisse21 cisse21 commented Aug 30, 2023

Description

Add stats for failures at GW

Linear Ticket

https://linear.app/rudderstack/issue/PIPE-203/release-1130-fixes

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@@ -36,10 +36,26 @@ func (gw *Handle) writeKeyAuth(delegate http.HandlerFunc) http.HandlerFunc {
}
arctx := gw.authRequestContextForWriteKey(writeKey)
if arctx == nil {
stat := gwstats.SourceStat{
Copy link
Contributor

Choose a reason for hiding this comment

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

can we handle this stat centrally, eg. similar to what gw#handleHttpError does?

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed this... let me know if this looks good

@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.12% 🎉

Comparison is base (fdfb4f6) 69.06% compared to head (3f8a376) 69.19%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3809      +/-   ##
==========================================
+ Coverage   69.06%   69.19%   +0.12%     
==========================================
  Files         349      349              
  Lines       51899    51947      +48     
==========================================
+ Hits        35845    35944      +99     
+ Misses      13748    13700      -48     
+ Partials     2306     2303       -3     
Files Changed Coverage Δ
gateway/internal/stats/stats.go 100.00% <ø> (ø)
gateway/handle_http_auth.go 100.00% <100.00%> (ø)
gateway/handle_http_beacon.go 100.00% <100.00%> (ø)
gateway/handle_http_pixel.go 73.11% <100.00%> (+2.53%) ⬆️

... and 10 files with indirect coverage changes

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

@Sidddddarth Sidddddarth merged commit 437b8d5 into master Sep 1, 2023
35 checks passed
@Sidddddarth Sidddddarth deleted the chore.addGWFailureStats branch September 1, 2023 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants