Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Fixes #1532
Browse files Browse the repository at this point in the history
- Adds 'unit' to metrics before calling collect
  • Loading branch information
Joel R Cooklin committed Feb 23, 2017
1 parent 7fc6a2f commit 8eb0d7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions control/plugin/client/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ func ToMetric(co core.Metric) *rpc.Metric {
Sec: co.LastAdvertisedTime().Unix(),
Nsec: int64(co.Timestamp().Nanosecond()),
},
Unit: co.Unit(),
}
if co.Config() != nil {
cm.Config = ConfigToConfigMap(co.Config())
Expand Down
1 change: 1 addition & 0 deletions control/plugin/client/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ func (p *PluginNativeClient) CollectMetrics(mts []core.Metric) ([]core.Metric, e
Version_: mt.Version(),
Tags_: mt.Tags(),
Config_: mt.Config(),
Unit_: mt.Unit(),
}
}

Expand Down

0 comments on commit 8eb0d7c

Please sign in to comment.