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 diff --git a/internal/api/lineprotocol.go b/internal/api/lineprotocol.go index e05ebbe..2e1e5ca 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,7 +308,7 @@ 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()) } } @@ -319,14 +319,14 @@ func decodeLine(dec *lineprotocol.Decoder, if t, err = dec.Time(lineprotocol.Microsecond, t); err != nil { t = time.Now() if t, err = dec.Time(lineprotocol.Nanosecond, t); err != nil { - return fmt.Errorf("timestamp : %#v with error : %#v", t, err.Error()) + return fmt.Errorf("host %s: timestamp : %#v with error : %#v", host, t, err.Error()) } } } } if err != nil { - return fmt.Errorf("timestamp : %#v with error : %#v", t, err.Error()) + return fmt.Errorf("host %s: timestamp : %#v with error : %#v", host, t, err.Error()) } if err := ms.WriteToLevel(lvl, selector, t.Unix(), []memorystore.Metric{metric}); err != nil {