googleinterns / cloud-operations-api-mock

Apache License 2.0
5 stars 2 forks source link

metric_kind is not required in TimeSeries #58

Open aabmass opened 3 years ago

aabmass commented 3 years ago

We have this validation: https://github.com/googleinterns/cloud-operations-api-mock/blob/e8bcc34f971a612c9e598ce4c66c192448c7dac6/internal/validation/mock_metric_validation.go#L344-L356

However, the GCM documentation says:

MetricKind

The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE.