Skip to content

Commit

Permalink
introspection: capture rate-limited requests
Browse files Browse the repository at this point in the history
This is a bug, the introspection handler should
always be the outer-most handler or we lose insight
into how many requests were limited.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy committed Aug 6, 2021
1 parent 4cd0952 commit 5b129ad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions httptransport/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ func (t *Server) configureIndexerMode(_ context.Context) error {
intromw.InstrumentedHandler(AffectedManifestAPIPath, t.traceOpt, AffectedManifestHandler(t.indexer)))

t.Handle(IndexAPIPath,
ratelimitMW.Handler(IndexAPIPath,
intromw.InstrumentedHandler(IndexAPIPath, t.traceOpt, IndexHandler(t.indexer))))
intromw.InstrumentedHandler(IndexAPIPath, t.traceOpt, ratelimitMW.Handler(IndexAPIPath, IndexHandler(t.indexer))))

t.Handle(IndexReportAPIPath,
intromw.InstrumentedHandler(IndexReportAPIPath+"GET", t.traceOpt, IndexReportHandler(t.indexer)))
Expand Down

0 comments on commit 5b129ad

Please sign in to comment.