From b1af31ad603f6831089896811985ca709202dc8c Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Mon, 3 Aug 2020 04:29:04 -0700 Subject: [PATCH] feat(monitoring): update the API #### monitoring:v1 The following keys were changed: - schemas.DroppedLabels.description #### monitoring:v3 The following keys were added: - schemas.TimeSeries.properties.unit.description - schemas.TimeSeries.properties.unit.type - schemas.ValueDescriptor.properties.unit.description - schemas.ValueDescriptor.properties.unit.type The following keys were changed: - schemas.DroppedLabels.description - schemas.MetricDescriptor.description --- discovery/monitoring-v1.json | 4 ++-- discovery/monitoring-v3.json | 14 +++++++++++--- src/apis/monitoring/v1.ts | 2 +- src/apis/monitoring/v3.ts | 12 ++++++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/discovery/monitoring-v1.json b/discovery/monitoring-v1.json index a17d2f55c6..6144bbeea6 100644 --- a/discovery/monitoring-v1.json +++ b/discovery/monitoring-v1.json @@ -275,7 +275,7 @@ } } }, - "revision": "20200720", + "revision": "20200728", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -530,7 +530,7 @@ "type": "object" }, "DroppedLabels": { - "description": "A set of (label, value) pairs which were dropped during aggregation, attached to google.api.Distribution.Exemplars in google.api.Distribution values during aggregation.These values are used in combination with the label values that remain on the aggregated Distribution timeseries to construct the full label set for the exemplar values. The resulting full label set may be used to identify the specific task/job/instance (for example) which may be contributing to a long-tail, while allowing the storage savings of only storing aggregated distribution values for a large group.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities.", + "description": "A set of (label, value) pairs that were removed from a Distribution time series during aggregation and then added as an attachment to a Distribution.Exemplar.The full label set for the exemplars is constructed by using the dropped pairs in combination with the label values that remain on the aggregated Distribution time series. The constructed full label set can be used to identify the specific entity, such as the instance or job, which might be contributing to a long-tail. However, with dropped labels, the storage requirements are reduced because only the aggregated distribution values for a large group of time series are stored.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities.", "id": "DroppedLabels", "properties": { "label": { diff --git a/discovery/monitoring-v3.json b/discovery/monitoring-v3.json index e854715d34..1266bf8ec9 100644 --- a/discovery/monitoring-v3.json +++ b/discovery/monitoring-v3.json @@ -1848,7 +1848,7 @@ } } }, - "revision": "20200720", + "revision": "20200728", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -2476,7 +2476,7 @@ "type": "object" }, "DroppedLabels": { - "description": "A set of (label, value) pairs which were dropped during aggregation, attached to google.api.Distribution.Exemplars in google.api.Distribution values during aggregation.These values are used in combination with the label values that remain on the aggregated Distribution timeseries to construct the full label set for the exemplar values. The resulting full label set may be used to identify the specific task/job/instance (for example) which may be contributing to a long-tail, while allowing the storage savings of only storing aggregated distribution values for a large group.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities.", + "description": "A set of (label, value) pairs that were removed from a Distribution time series during aggregation and then added as an attachment to a Distribution.Exemplar.The full label set for the exemplars is constructed by using the dropped pairs in combination with the label values that remain on the aggregated Distribution time series. The constructed full label set can be used to identify the specific entity, such as the instance or job, which might be contributing to a long-tail. However, with dropped labels, the storage requirements are reduced because only the aggregated distribution values for a large group of time series are stored.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities.", "id": "DroppedLabels", "properties": { "label": { @@ -3260,7 +3260,7 @@ "type": "object" }, "MetricDescriptor": { - "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.The following are specific rules for service defined Monitoring metric descriptors:\ntype, metric_kind, value_type, description, and display_name fields are all required. The unit field must be specified if the value_type is any of DOUBLE, INT64, DISTRIBUTION.\nMaximum of default 500 metric descriptors per service is allowed.\nMaximum of default 10 labels per metric descriptor is allowed.The default maximum limit can be overridden. Please follow https://cloud.google.com/monitoring/quotas", + "description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.The following are specific rules for service defined Monitoring metric descriptors:\ntype, metric_kind, value_type and description fields are all required. The unit field must be specified if the value_type is any of DOUBLE, INT64, DISTRIBUTION.\nMaximum of default 500 metric descriptors per service is allowed.\nMaximum of default 10 labels per metric descriptor is allowed.The default maximum limit can be overridden. Please follow https://cloud.google.com/monitoring/quotas", "id": "MetricDescriptor", "properties": { "description": { @@ -4129,6 +4129,10 @@ "$ref": "MonitoredResource", "description": "The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data." }, + "unit": { + "description": "The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.", + "type": "string" + }, "valueType": { "description": "The value type of the time series. When listing time series, this value type might be different from the value type 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 type of the data in the points field.", "enum": [ @@ -4446,6 +4450,10 @@ ], "type": "string" }, + "unit": { + "description": "The unit in which time_series point values are reported. unit follows the UCUM format for units as seen in https://unitsofmeasure.org/ucum.html. unit is only valid if value_type is INTEGER, DOUBLE, DISTRIBUTION.", + "type": "string" + }, "valueType": { "description": "The value type.", "enum": [ diff --git a/src/apis/monitoring/v1.ts b/src/apis/monitoring/v1.ts index bcbf37483e..ed5f124c55 100644 --- a/src/apis/monitoring/v1.ts +++ b/src/apis/monitoring/v1.ts @@ -243,7 +243,7 @@ export namespace monitoring_v1 { timeSeriesQuery?: Schema$TimeSeriesQuery; } /** - * A set of (label, value) pairs which were dropped during aggregation, attached to google.api.Distribution.Exemplars in google.api.Distribution values during aggregation.These values are used in combination with the label values that remain on the aggregated Distribution timeseries to construct the full label set for the exemplar values. The resulting full label set may be used to identify the specific task/job/instance (for example) which may be contributing to a long-tail, while allowing the storage savings of only storing aggregated distribution values for a large group.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities. + * A set of (label, value) pairs that were removed from a Distribution time series during aggregation and then added as an attachment to a Distribution.Exemplar.The full label set for the exemplars is constructed by using the dropped pairs in combination with the label values that remain on the aggregated Distribution time series. The constructed full label set can be used to identify the specific entity, such as the instance or job, which might be contributing to a long-tail. However, with dropped labels, the storage requirements are reduced because only the aggregated distribution values for a large group of time series are stored.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities. */ export interface Schema$DroppedLabels { /** diff --git a/src/apis/monitoring/v3.ts b/src/apis/monitoring/v3.ts index 4bda6e2ace..da96b48b88 100644 --- a/src/apis/monitoring/v3.ts +++ b/src/apis/monitoring/v3.ts @@ -537,7 +537,7 @@ export namespace monitoring_v3 { mimeType?: string | null; } /** - * A set of (label, value) pairs which were dropped during aggregation, attached to google.api.Distribution.Exemplars in google.api.Distribution values during aggregation.These values are used in combination with the label values that remain on the aggregated Distribution timeseries to construct the full label set for the exemplar values. The resulting full label set may be used to identify the specific task/job/instance (for example) which may be contributing to a long-tail, while allowing the storage savings of only storing aggregated distribution values for a large group.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities. + * A set of (label, value) pairs that were removed from a Distribution time series during aggregation and then added as an attachment to a Distribution.Exemplar.The full label set for the exemplars is constructed by using the dropped pairs in combination with the label values that remain on the aggregated Distribution time series. The constructed full label set can be used to identify the specific entity, such as the instance or job, which might be contributing to a long-tail. However, with dropped labels, the storage requirements are reduced because only the aggregated distribution values for a large group of time series are stored.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities. */ export interface Schema$DroppedLabels { /** @@ -1076,7 +1076,7 @@ export namespace monitoring_v3 { trigger?: Schema$Trigger; } /** - * Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.The following are specific rules for service defined Monitoring metric descriptors: type, metric_kind, value_type, description, and display_name fields are all required. The unit field must be specified if the value_type is any of DOUBLE, INT64, DISTRIBUTION. Maximum of default 500 metric descriptors per service is allowed. Maximum of default 10 labels per metric descriptor is allowed.The default maximum limit can be overridden. Please follow https://cloud.google.com/monitoring/quotas + * Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.The following are specific rules for service defined Monitoring metric descriptors: type, metric_kind, value_type and description fields are all required. The unit field must be specified if the value_type is any of DOUBLE, INT64, DISTRIBUTION. Maximum of default 500 metric descriptors per service is allowed. Maximum of default 10 labels per metric descriptor is allowed.The default maximum limit can be overridden. Please follow https://cloud.google.com/monitoring/quotas */ export interface Schema$MetricDescriptor { /** @@ -1635,6 +1635,10 @@ export namespace monitoring_v3 { * The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. */ resource?: Schema$MonitoredResource; + /** + * The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values. + */ + unit?: string | null; /** * The value type of the time series. When listing time series, this value type might be different from the value type 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 type of the data in the points field. */ @@ -1832,6 +1836,10 @@ export namespace monitoring_v3 { * The value stream kind. */ metricKind?: string | null; + /** + * The unit in which time_series point values are reported. unit follows the UCUM format for units as seen in https://unitsofmeasure.org/ucum.html. unit is only valid if value_type is INTEGER, DOUBLE, DISTRIBUTION. + */ + unit?: string | null; /** * The value type. */