Skip to content

Commit

Permalink
Merge pull request #4 from mynameiswhm/patch-1
Browse files Browse the repository at this point in the history
added category tag
  • Loading branch information
olegfedoseev committed May 20, 2015
2 parents 4532ffa + e54f365 commit 9be656d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aggregator/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ func (w *Writer) Start() {
continue // no server tag :(
}

tags := m.Tags.Filter(&[]string{"status", "user", "type", "region"})
tags := m.Tags.Filter(&[]string{"status", "user", "category", "type", "region"})
metricsBuffer.Add(ts, tags, "php.requests", m.Count, m.Value, m.Cpu)

tags = m.Tags.Filter(&[]string{"script", "status", "user", "type", "region"})
tags = m.Tags.Filter(&[]string{"script", "status", "user", "category", "type", "region"})
metricsBuffer.Add(ts, tags, "php.requests."+server, m.Count, m.Value, m.Cpu)

} else if m.Name == "timer" {
Expand All @@ -85,10 +85,10 @@ func (w *Writer) Start() {
continue // no group tag :(
}

tags := m.Tags.Filter(&[]string{"server", "operation", "type", "region", "ns", "database"})
tags := m.Tags.Filter(&[]string{"server", "operation", "category", "type", "region", "ns", "database"})
metricsBuffer.Add(ts, tags, "php.timers."+group, m.Count, m.Value, 0)

tags = m.Tags.Filter(&[]string{"script", "operation", "type", "region", "ns", "database"})
tags = m.Tags.Filter(&[]string{"script", "operation", "category", "type", "region", "ns", "database"})
metricsBuffer.Add(ts, tags, "php.timers."+server+"."+group, m.Count, m.Value, 0)

} else {
Expand Down

0 comments on commit 9be656d

Please sign in to comment.