Skip to content

Commit

Permalink
collectd receiver metric name from type to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mfyuce committed Jan 18, 2024
1 parent 9e575cf commit 2b89f5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions receiver/collectdreceiver/collectd.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,16 @@ func (cdr *collectDRecord) getReasonableMetricName(index int, attrs map[string]s
// }
//}
//
if cdr.TypeS != nil {
capacity += len(*cdr.TypeS)
if cdr.Plugin != nil {
capacity += len(*cdr.Plugin)
}
//if cdr.TypeInstance != nil {
// capacity += len(*cdr.TypeInstance)
//}
parts := make([]byte, 0, capacity)

if !isNilOrEmpty(cdr.TypeS) {
parts = append(parts, *cdr.TypeS...)
if !isNilOrEmpty(cdr.Plugin) {
parts = append(parts, *cdr.Plugin...)
}
//parts = cdr.pointTypeInstance(attrs, parts)
//if cdr.Dsnames != nil && !isNilOrEmpty(cdr.Dsnames[index]) && len(cdr.Dsnames) > 1 {
Expand Down

0 comments on commit 2b89f5f

Please sign in to comment.