From 07bcd523f304c9564b289a97802c9f74c7ce9682 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Fri, 18 Sep 2015 14:12:13 -0700 Subject: [PATCH] Tag Go memstats during writes to _internal --- CHANGELOG.md | 1 + monitor/service.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 509b108f25a..379a6db4238 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - [#4111](https://github.com/influxdb/influxdb/pull/4111): Update pre-commit hook for go vet composites - [#4136](https://github.com/influxdb/influxdb/pull/4136): Return an error-on-write if target retention policy does not exist. Thanks for the report @ymettier - [#4124](https://github.com/influxdb/influxdb/issues/4124): Missing defer/recover/panic idiom in HTTPD service +- [#4165](https://github.com/influxdb/influxdb/pull/4165): Tag all Go runtime stats when writing to _internal ## v0.9.4 [2015-09-14] diff --git a/monitor/service.go b/monitor/service.go index 7b96dc4bfb5..386601fe7d3 100644 --- a/monitor/service.go +++ b/monitor/service.go @@ -241,6 +241,12 @@ func (m *Monitor) Statistics(tags map[string]string) ([]*statistic, error) { Tags: make(map[string]string), Values: make(map[string]interface{}), } + + // Add any supplied tags to Go memstats + for k, v := range tags { + statistic.Tags[k] = v + } + var rt runtime.MemStats runtime.ReadMemStats(&rt) statistic.Values = map[string]interface{}{