monitoring: Fix rate limit monitoring
Created by: ryanslade
Keep correct resource when using WithAuthenticator
Don't iterate over map when setting collector functions. It caused us to pick one resource at random based on the order the map was iterated over and record all operations against it.
Here's a Go playground showing the issue: https://play.golang.org/p/3d5YThVmErr
Merge request reports
Activity
Created by: sourcegraph-bot
Notifying subscribers in CODENOTIFY files for diff 8ce886256bbda5ae7f7c7d1911c5b49a71379a53...c3c7fa04649a3281518bc2227653c4bb6083e25c.
Notify File(s) @LawnGnome internal/extsvc/github/v3.go @eseliger internal/extsvc/github/v3.go Created by: codecov[bot]
Codecov Report
Merging #16826 (c3c7fa0) into main (bfff635) will decrease coverage by
0.00%
. The diff coverage is75.00%
.@@ Coverage Diff @@ ## main #16826 +/- ## ========================================== - Coverage 52.49% 52.49% -0.01% ========================================== Files 1703 1703 Lines 84831 84834 +3 Branches 7606 7606 ========================================== + Hits 44530 44531 +1 - Misses 36401 36403 +2 Partials 3900 3900
Flag Coverage Δ *Carryforward flag go 51.70% <75.00%> (-0.01%)
integration 29.69% <ø> (ø)
Carriedforward from 743d1fa storybook 28.77% <ø> (ø)
Carriedforward from 743d1fa typescript 54.38% <ø> (ø)
Carriedforward from 743d1fa unit 34.99% <ø> (ø)
Carriedforward from 743d1fa *This pull request uses carry forward flags. Click here to find out more.
Impacted Files Coverage Δ internal/repos/github.go 59.80% <50.00%> (-0.05%)
internal/extsvc/github/v3.go 82.00% <100.00%> (+0.36%)
enterprise/internal/campaigns/syncer/syncer.go 60.08% <0.00%> (-1.35%)
.../internal/codeintel/resolvers/graphql/locations.go 85.56% <0.00%> (+2.06%)
Please register or sign in to reply