From 7ee0a01eff7dab5588783551d2f6536ae8657115 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 20 Nov 2024 06:57:24 +0100 Subject: [PATCH 1/2] Add hostname to error messages --- internal/api/lineprotocol.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/api/lineprotocol.go b/internal/api/lineprotocol.go index 75d2b20..492cc7c 100644 --- a/internal/api/lineprotocol.go +++ b/internal/api/lineprotocol.go @@ -298,7 +298,7 @@ func decodeLine(dec *lineprotocol.Decoder, } if string(key) != "value" { - return fmt.Errorf("unkown field: '%s' (value: %#v)", string(key), val) + return fmt.Errorf("host %s: unknown field: '%s' (value: %#v)", host, string(key), val) } if val.Kind() == lineprotocol.Float { @@ -308,12 +308,12 @@ func decodeLine(dec *lineprotocol.Decoder, } else if val.Kind() == lineprotocol.Uint { metric.Value = util.Float(val.UintV()) } else { - return fmt.Errorf("unsupported value type in message: %s", val.Kind().String()) + return fmt.Errorf("host %s: unsupported value type in message: %s", host, val.Kind().String()) } } if t, err = dec.Time(lineprotocol.Second, t); err != nil { - return fmt.Errorf("timestamp : %#v with error : %#v", lineprotocol.Second, err.Error()) + return fmt.Errorf("host %s: timestamp : %#v with error : %#v", host, lineprotocol.Second, err.Error()) } if err := ms.WriteToLevel(lvl, selector, t.Unix(), []memorystore.Metric{metric}); err != nil { From 5c32d60970123230d27b37ef8a98158ed87dc83b Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Sun, 24 Nov 2024 08:46:44 +0100 Subject: [PATCH 2/2] Prepare release 0.1.0 --- ReleaseNotes.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 31ffb62..a24097f 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -4,6 +4,17 @@ This is a minor release of `cc-metric-store`, the metric timeseries cache implementation of ClusterCockpit. For release specific notes visit the [ClusterCockpit Documentation](https://clusterockpit.org/docs/release/). +Notable changes: + +- Cleanup of code and restructuring +- Document REST API with Swagger +- Introduce REST API versioning +- Provide Swagger UI test web-frontend +- Introduce re-sampling of metric data +- Support also ms, ns in line protocol +- Support NATS credentials + + ## Breaking changes None