Skip to content

Commit

Permalink
add coment about removeQueryID
Browse files Browse the repository at this point in the history
  • Loading branch information
splichy committed Nov 16, 2020
1 parent b3d4e56 commit 032f190
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ func (c *Collector) addTable(name string) *Table {

// Push - adding query to collector with query params (with query) and rows
func (c *Collector) Push(paramsIn string, content string) {
// as we are using all params a table key, we have to remove query_id
// as we are using all params as a table key, we have to remove query_id
// otherwise every query will be threated as unique thus it will consume more memory
params := ""
if c.RemoveQueryID {
items := strings.Split(paramsIn, "&")
for _, p := range items {
if !HasPrefix(p, "query_id=") {
//params = strings.ReplaceAll(params, p, "")
params += "&" + p
}
}
Expand Down

0 comments on commit 032f190

Please sign in to comment.