Skip to content

Commit

Permalink
fix: Apply query filter to metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Reedy <[email protected]>
  • Loading branch information
breed808 committed Feb 16, 2024
1 parent 6eebfcc commit cfc9bb2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/collector/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ func (c *Collectors) BuildServeHTTP(disableExporterMetrics bool, timeoutMargin f
}
filteredCollectors[name] = col
}
return nil, NewPrometheus(timeout, c, c.logger)

filtered := Collectors{
logger: c.logger,
collectors: filteredCollectors,
perfCounterQuery: c.perfCounterQuery,
}

return nil, NewPrometheus(timeout, &filtered, c.logger)
}

return func(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit cfc9bb2

Please sign in to comment.