google-cloud-monitoring 0.37.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +2 -1
- data/AUTHENTICATION.md +51 -59
- data/LICENSE.md +203 -0
- data/MIGRATING.md +361 -0
- data/README.md +34 -50
- data/lib/google-cloud-monitoring.rb +6 -5
- data/lib/google/cloud/monitoring.rb +255 -443
- data/lib/google/cloud/monitoring/dashboard.rb +88 -117
- data/lib/google/cloud/monitoring/{v3/doc/google/protobuf/wrappers.rb → dashboard/version.rb} +12 -9
- data/lib/google/cloud/monitoring/version.rb +6 -2
- metadata +72 -129
- data/LICENSE +0 -201
- data/lib/google/cloud/monitoring/dashboard/v1.rb +0 -148
- data/lib/google/cloud/monitoring/dashboard/v1/credentials.rb +0 -46
- data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service_client.rb +0 -457
- data/lib/google/cloud/monitoring/dashboard/v1/dashboards_service_client_config.json +0 -51
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/common.rb +0 -394
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/dashboard.rb +0 -53
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/dashboards_service.rb +0 -82
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/layouts.rb +0 -71
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/metrics.rb +0 -151
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/scorecard.rb +0 -102
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/text.rb +0 -43
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/widget.rb +0 -41
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/monitoring/dashboard/v1/xychart.rb +0 -141
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/monitoring/dashboard/v1/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/monitoring/v3.rb +0 -532
- data/lib/google/cloud/monitoring/v3/alert_policy_service_client.rb +0 -553
- data/lib/google/cloud/monitoring/v3/alert_policy_service_client_config.json +0 -51
- data/lib/google/cloud/monitoring/v3/credentials.rb +0 -44
- data/lib/google/cloud/monitoring/v3/doc/google/api/distribution.rb +0 -200
- data/lib/google/cloud/monitoring/v3/doc/google/api/label.rb +0 -42
- data/lib/google/cloud/monitoring/v3/doc/google/api/metric.rb +0 -245
- data/lib/google/cloud/monitoring/v3/doc/google/api/monitored_resource.rb +0 -108
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert.rb +0 -345
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/alert_service.rb +0 -138
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/common.rb +0 -461
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/group.rb +0 -75
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/group_service.rb +0 -167
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric.rb +0 -85
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/metric_service.rb +0 -230
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/mutation_record.rb +0 -29
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification.rb +0 -156
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/notification_service.rb +0 -221
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/service.rb +0 -361
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/service_service.rb +0 -197
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime.rb +0 -326
- data/lib/google/cloud/monitoring/v3/doc/google/monitoring/v3/uptime_service.rb +0 -136
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/struct.rb +0 -74
- data/lib/google/cloud/monitoring/v3/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/monitoring/v3/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/monitoring/v3/group_service_client.rb +0 -606
- data/lib/google/cloud/monitoring/v3/group_service_client_config.json +0 -56
- data/lib/google/cloud/monitoring/v3/metric_service_client.rb +0 -750
- data/lib/google/cloud/monitoring/v3/metric_service_client_config.json +0 -66
- data/lib/google/cloud/monitoring/v3/notification_channel_service_client.rb +0 -811
- data/lib/google/cloud/monitoring/v3/notification_channel_service_client_config.json +0 -76
- data/lib/google/cloud/monitoring/v3/service_monitoring_service_client.rb +0 -788
- data/lib/google/cloud/monitoring/v3/service_monitoring_service_client_config.json +0 -76
- data/lib/google/cloud/monitoring/v3/uptime_check_service_client.rb +0 -550
- data/lib/google/cloud/monitoring/v3/uptime_check_service_client_config.json +0 -56
- data/lib/google/monitoring/dashboard/v1/common_pb.rb +0 -95
- data/lib/google/monitoring/dashboard/v1/dashboard_pb.rb +0 -29
- data/lib/google/monitoring/dashboard/v1/dashboards_service_pb.rb +0 -51
- data/lib/google/monitoring/dashboard/v1/dashboards_service_services_pb.rb +0 -76
- data/lib/google/monitoring/dashboard/v1/drilldowns_pb.rb +0 -17
- data/lib/google/monitoring/dashboard/v1/layouts_pb.rb +0 -41
- data/lib/google/monitoring/dashboard/v1/metrics_pb.rb +0 -76
- data/lib/google/monitoring/dashboard/v1/scorecard_pb.rb +0 -38
- data/lib/google/monitoring/dashboard/v1/service_pb.rb +0 -17
- data/lib/google/monitoring/dashboard/v1/text_pb.rb +0 -28
- data/lib/google/monitoring/dashboard/v1/widget_pb.rb +0 -32
- data/lib/google/monitoring/dashboard/v1/xychart_pb.rb +0 -66
- data/lib/google/monitoring/v3/alert_pb.rb +0 -87
- data/lib/google/monitoring/v3/alert_service_pb.rb +0 -53
- data/lib/google/monitoring/v3/alert_service_services_pb.rb +0 -63
- data/lib/google/monitoring/v3/common_pb.rb +0 -95
- data/lib/google/monitoring/v3/dropped_labels_pb.rb +0 -19
- data/lib/google/monitoring/v3/group_pb.rb +0 -24
- data/lib/google/monitoring/v3/group_service_pb.rb +0 -73
- data/lib/google/monitoring/v3/group_service_services_pb.rb +0 -66
- data/lib/google/monitoring/v3/metric_pb.rb +0 -82
- data/lib/google/monitoring/v3/metric_service_pb.rb +0 -130
- data/lib/google/monitoring/v3/metric_service_services_pb.rb +0 -66
- data/lib/google/monitoring/v3/mutation_record_pb.rb +0 -21
- data/lib/google/monitoring/v3/notification_pb.rb +0 -47
- data/lib/google/monitoring/v3/notification_service_pb.rb +0 -90
- data/lib/google/monitoring/v3/notification_service_services_pb.rb +0 -94
- data/lib/google/monitoring/v3/service_pb.rb +0 -149
- data/lib/google/monitoring/v3/service_service_pb.rb +0 -86
- data/lib/google/monitoring/v3/service_service_services_pb.rb +0 -65
- data/lib/google/monitoring/v3/span_context_pb.rb +0 -19
- data/lib/google/monitoring/v3/uptime_pb.rb +0 -109
- data/lib/google/monitoring/v3/uptime_service_pb.rb +0 -63
- data/lib/google/monitoring/v3/uptime_service_services_pb.rb +0 -67
@@ -1,51 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"interfaces": {
|
3
|
-
"google.monitoring.v3.AlertPolicyService": {
|
4
|
-
"retry_codes": {
|
5
|
-
"idempotent": [
|
6
|
-
"DEADLINE_EXCEEDED",
|
7
|
-
"UNAVAILABLE"
|
8
|
-
],
|
9
|
-
"non_idempotent": []
|
10
|
-
},
|
11
|
-
"retry_params": {
|
12
|
-
"default": {
|
13
|
-
"initial_retry_delay_millis": 100,
|
14
|
-
"retry_delay_multiplier": 1.3,
|
15
|
-
"max_retry_delay_millis": 60000,
|
16
|
-
"initial_rpc_timeout_millis": 20000,
|
17
|
-
"rpc_timeout_multiplier": 1.0,
|
18
|
-
"max_rpc_timeout_millis": 20000,
|
19
|
-
"total_timeout_millis": 600000
|
20
|
-
}
|
21
|
-
},
|
22
|
-
"methods": {
|
23
|
-
"ListAlertPolicies": {
|
24
|
-
"timeout_millis": 60000,
|
25
|
-
"retry_codes_name": "idempotent",
|
26
|
-
"retry_params_name": "default"
|
27
|
-
},
|
28
|
-
"GetAlertPolicy": {
|
29
|
-
"timeout_millis": 60000,
|
30
|
-
"retry_codes_name": "idempotent",
|
31
|
-
"retry_params_name": "default"
|
32
|
-
},
|
33
|
-
"CreateAlertPolicy": {
|
34
|
-
"timeout_millis": 60000,
|
35
|
-
"retry_codes_name": "non_idempotent",
|
36
|
-
"retry_params_name": "default"
|
37
|
-
},
|
38
|
-
"DeleteAlertPolicy": {
|
39
|
-
"timeout_millis": 60000,
|
40
|
-
"retry_codes_name": "idempotent",
|
41
|
-
"retry_params_name": "default"
|
42
|
-
},
|
43
|
-
"UpdateAlertPolicy": {
|
44
|
-
"timeout_millis": 60000,
|
45
|
-
"retry_codes_name": "non_idempotent",
|
46
|
-
"retry_params_name": "default"
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
51
|
-
}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
require "googleauth"
|
17
|
-
|
18
|
-
module Google
|
19
|
-
module Cloud
|
20
|
-
module Monitoring
|
21
|
-
module V3
|
22
|
-
class Credentials < Google::Auth::Credentials
|
23
|
-
SCOPE = [
|
24
|
-
"https://www.googleapis.com/auth/cloud-platform",
|
25
|
-
"https://www.googleapis.com/auth/monitoring",
|
26
|
-
"https://www.googleapis.com/auth/monitoring.read",
|
27
|
-
"https://www.googleapis.com/auth/monitoring.write"
|
28
|
-
].freeze
|
29
|
-
PATH_ENV_VARS = %w(MONITORING_CREDENTIALS
|
30
|
-
MONITORING_KEYFILE
|
31
|
-
GOOGLE_CLOUD_CREDENTIALS
|
32
|
-
GOOGLE_CLOUD_KEYFILE
|
33
|
-
GCLOUD_KEYFILE)
|
34
|
-
JSON_ENV_VARS = %w(MONITORING_CREDENTIALS_JSON
|
35
|
-
MONITORING_KEYFILE_JSON
|
36
|
-
GOOGLE_CLOUD_CREDENTIALS_JSON
|
37
|
-
GOOGLE_CLOUD_KEYFILE_JSON
|
38
|
-
GCLOUD_KEYFILE_JSON)
|
39
|
-
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,200 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Api
|
18
|
-
# `Distribution` contains summary statistics for a population of values. It
|
19
|
-
# optionally contains a histogram representing the distribution of those values
|
20
|
-
# across a set of buckets.
|
21
|
-
#
|
22
|
-
# The summary statistics are the count, mean, sum of the squared deviation from
|
23
|
-
# the mean, the minimum, and the maximum of the set of population of values.
|
24
|
-
# The histogram is based on a sequence of buckets and gives a count of values
|
25
|
-
# that fall into each bucket. The boundaries of the buckets are given either
|
26
|
-
# explicitly or by formulas for buckets of fixed or exponentially increasing
|
27
|
-
# widths.
|
28
|
-
#
|
29
|
-
# Although it is not forbidden, it is generally a bad idea to include
|
30
|
-
# non-finite values (infinities or NaNs) in the population of values, as this
|
31
|
-
# will render the `mean` and `sum_of_squared_deviation` fields meaningless.
|
32
|
-
# @!attribute [rw] count
|
33
|
-
# @return [Integer]
|
34
|
-
# The number of values in the population. Must be non-negative. This value
|
35
|
-
# must equal the sum of the values in `bucket_counts` if a histogram is
|
36
|
-
# provided.
|
37
|
-
# @!attribute [rw] mean
|
38
|
-
# @return [Float]
|
39
|
-
# The arithmetic mean of the values in the population. If `count` is zero
|
40
|
-
# then this field must be zero.
|
41
|
-
# @!attribute [rw] sum_of_squared_deviation
|
42
|
-
# @return [Float]
|
43
|
-
# The sum of squared deviations from the mean of the values in the
|
44
|
-
# population. For values x_i this is:
|
45
|
-
#
|
46
|
-
# Sum[i=1..n](https://cloud.google.com(x_i - mean)^2)
|
47
|
-
#
|
48
|
-
# Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
|
49
|
-
# describes Welford's method for accumulating this sum in one pass.
|
50
|
-
#
|
51
|
-
# If `count` is zero then this field must be zero.
|
52
|
-
# @!attribute [rw] range
|
53
|
-
# @return [Google::Api::Distribution::Range]
|
54
|
-
# If specified, contains the range of the population values. The field
|
55
|
-
# must not be present if the `count` is zero.
|
56
|
-
# @!attribute [rw] bucket_options
|
57
|
-
# @return [Google::Api::Distribution::BucketOptions]
|
58
|
-
# Defines the histogram bucket boundaries. If the distribution does not
|
59
|
-
# contain a histogram, then omit this field.
|
60
|
-
# @!attribute [rw] bucket_counts
|
61
|
-
# @return [Array<Integer>]
|
62
|
-
# The number of values in each bucket of the histogram, as described in
|
63
|
-
# `bucket_options`. If the distribution does not have a histogram, then omit
|
64
|
-
# this field. If there is a histogram, then the sum of the values in
|
65
|
-
# `bucket_counts` must equal the value in the `count` field of the
|
66
|
-
# distribution.
|
67
|
-
#
|
68
|
-
# If present, `bucket_counts` should contain N values, where N is the number
|
69
|
-
# of buckets specified in `bucket_options`. If you supply fewer than N
|
70
|
-
# values, the remaining values are assumed to be 0.
|
71
|
-
#
|
72
|
-
# The order of the values in `bucket_counts` follows the bucket numbering
|
73
|
-
# schemes described for the three bucket types. The first value must be the
|
74
|
-
# count for the underflow bucket (number 0). The next N-2 values are the
|
75
|
-
# counts for the finite buckets (number 1 through N-2). The N'th value in
|
76
|
-
# `bucket_counts` is the count for the overflow bucket (number N-1).
|
77
|
-
# @!attribute [rw] exemplars
|
78
|
-
# @return [Array<Google::Api::Distribution::Exemplar>]
|
79
|
-
# Must be in increasing order of `value` field.
|
80
|
-
class Distribution
|
81
|
-
# The range of the population values.
|
82
|
-
# @!attribute [rw] min
|
83
|
-
# @return [Float]
|
84
|
-
# The minimum of the population values.
|
85
|
-
# @!attribute [rw] max
|
86
|
-
# @return [Float]
|
87
|
-
# The maximum of the population values.
|
88
|
-
class Range; end
|
89
|
-
|
90
|
-
# `BucketOptions` describes the bucket boundaries used to create a histogram
|
91
|
-
# for the distribution. The buckets can be in a linear sequence, an
|
92
|
-
# exponential sequence, or each bucket can be specified explicitly.
|
93
|
-
# `BucketOptions` does not include the number of values in each bucket.
|
94
|
-
#
|
95
|
-
# A bucket has an inclusive lower bound and exclusive upper bound for the
|
96
|
-
# values that are counted for that bucket. The upper bound of a bucket must
|
97
|
-
# be strictly greater than the lower bound. The sequence of N buckets for a
|
98
|
-
# distribution consists of an underflow bucket (number 0), zero or more
|
99
|
-
# finite buckets (number 1 through N - 2) and an overflow bucket (number N -
|
100
|
-
# 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
|
101
|
-
# same as the upper bound of bucket i - 1. The buckets span the whole range
|
102
|
-
# of finite values: lower bound of the underflow bucket is -infinity and the
|
103
|
-
# upper bound of the overflow bucket is +infinity. The finite buckets are
|
104
|
-
# so-called because both bounds are finite.
|
105
|
-
# @!attribute [rw] linear_buckets
|
106
|
-
# @return [Google::Api::Distribution::BucketOptions::Linear]
|
107
|
-
# The linear bucket.
|
108
|
-
# @!attribute [rw] exponential_buckets
|
109
|
-
# @return [Google::Api::Distribution::BucketOptions::Exponential]
|
110
|
-
# The exponential buckets.
|
111
|
-
# @!attribute [rw] explicit_buckets
|
112
|
-
# @return [Google::Api::Distribution::BucketOptions::Explicit]
|
113
|
-
# The explicit buckets.
|
114
|
-
class BucketOptions
|
115
|
-
# Specifies a linear sequence of buckets that all have the same width
|
116
|
-
# (except overflow and underflow). Each bucket represents a constant
|
117
|
-
# absolute uncertainty on the specific value in the bucket.
|
118
|
-
#
|
119
|
-
# There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
|
120
|
-
# following boundaries:
|
121
|
-
#
|
122
|
-
# Upper bound (0 <= i < N-1): offset + (width * i).
|
123
|
-
# Lower bound (1 <= i < N): offset + (width * (i - 1)).
|
124
|
-
# @!attribute [rw] num_finite_buckets
|
125
|
-
# @return [Integer]
|
126
|
-
# Must be greater than 0.
|
127
|
-
# @!attribute [rw] width
|
128
|
-
# @return [Float]
|
129
|
-
# Must be greater than 0.
|
130
|
-
# @!attribute [rw] offset
|
131
|
-
# @return [Float]
|
132
|
-
# Lower bound of the first bucket.
|
133
|
-
class Linear; end
|
134
|
-
|
135
|
-
# Specifies an exponential sequence of buckets that have a width that is
|
136
|
-
# proportional to the value of the lower bound. Each bucket represents a
|
137
|
-
# constant relative uncertainty on a specific value in the bucket.
|
138
|
-
#
|
139
|
-
# There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
|
140
|
-
# following boundaries:
|
141
|
-
#
|
142
|
-
# Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).
|
143
|
-
# Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
|
144
|
-
# @!attribute [rw] num_finite_buckets
|
145
|
-
# @return [Integer]
|
146
|
-
# Must be greater than 0.
|
147
|
-
# @!attribute [rw] growth_factor
|
148
|
-
# @return [Float]
|
149
|
-
# Must be greater than 1.
|
150
|
-
# @!attribute [rw] scale
|
151
|
-
# @return [Float]
|
152
|
-
# Must be greater than 0.
|
153
|
-
class Exponential; end
|
154
|
-
|
155
|
-
# Specifies a set of buckets with arbitrary widths.
|
156
|
-
#
|
157
|
-
# There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
|
158
|
-
# boundaries:
|
159
|
-
#
|
160
|
-
# Upper bound (0 <= i < N-1): bounds[i]
|
161
|
-
# Lower bound (1 <= i < N); bounds[i - 1]
|
162
|
-
#
|
163
|
-
# The `bounds` field must contain at least one element. If `bounds` has
|
164
|
-
# only one element, then there are no finite buckets, and that single
|
165
|
-
# element is the common boundary of the overflow and underflow buckets.
|
166
|
-
# @!attribute [rw] bounds
|
167
|
-
# @return [Array<Float>]
|
168
|
-
# The values must be monotonically increasing.
|
169
|
-
class Explicit; end
|
170
|
-
end
|
171
|
-
|
172
|
-
# Exemplars are example points that may be used to annotate aggregated
|
173
|
-
# distribution values. They are metadata that gives information about a
|
174
|
-
# particular value added to a Distribution bucket, such as a trace ID that
|
175
|
-
# was active when a value was added. They may contain further information,
|
176
|
-
# such as a example values and timestamps, origin, etc.
|
177
|
-
# @!attribute [rw] value
|
178
|
-
# @return [Float]
|
179
|
-
# Value of the exemplar point. This value determines to which bucket the
|
180
|
-
# exemplar belongs.
|
181
|
-
# @!attribute [rw] timestamp
|
182
|
-
# @return [Google::Protobuf::Timestamp]
|
183
|
-
# The observation (sampling) time of the above value.
|
184
|
-
# @!attribute [rw] attachments
|
185
|
-
# @return [Array<Google::Protobuf::Any>]
|
186
|
-
# Contextual information about the example value. Examples are:
|
187
|
-
#
|
188
|
-
# Trace: type.googleapis.com/google.monitoring.v3.SpanContext
|
189
|
-
#
|
190
|
-
# Literal string: type.googleapis.com/google.protobuf.StringValue
|
191
|
-
#
|
192
|
-
# Labels dropped during aggregation:
|
193
|
-
# type.googleapis.com/google.monitoring.v3.DroppedLabels
|
194
|
-
#
|
195
|
-
# There may be only a single attachment of any given message type in a
|
196
|
-
# single exemplar, and this is enforced by the system.
|
197
|
-
class Exemplar; end
|
198
|
-
end
|
199
|
-
end
|
200
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Api
|
18
|
-
# A description of a label.
|
19
|
-
# @!attribute [rw] key
|
20
|
-
# @return [String]
|
21
|
-
# The label key.
|
22
|
-
# @!attribute [rw] value_type
|
23
|
-
# @return [Google::Api::LabelDescriptor::ValueType]
|
24
|
-
# The type of data that can be assigned to the label.
|
25
|
-
# @!attribute [rw] description
|
26
|
-
# @return [String]
|
27
|
-
# A human-readable description for the label.
|
28
|
-
class LabelDescriptor
|
29
|
-
# Value types that can be used as label values.
|
30
|
-
module ValueType
|
31
|
-
# A variable-length string. This is the default.
|
32
|
-
STRING = 0
|
33
|
-
|
34
|
-
# Boolean; true or false.
|
35
|
-
BOOL = 1
|
36
|
-
|
37
|
-
# A 64-bit signed integer.
|
38
|
-
INT64 = 2
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,245 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Api
|
18
|
-
# Defines a metric type and its schema. Once a metric descriptor is created,
|
19
|
-
# deleting or altering it stops data collection and makes the metric type's
|
20
|
-
# existing data unusable.
|
21
|
-
# @!attribute [rw] name
|
22
|
-
# @return [String]
|
23
|
-
# The resource name of the metric descriptor.
|
24
|
-
# @!attribute [rw] type
|
25
|
-
# @return [String]
|
26
|
-
# The metric type, including its DNS name prefix. The type is not
|
27
|
-
# URL-encoded. All user-defined metric types have the DNS name
|
28
|
-
# `custom.googleapis.com` or `external.googleapis.com`. Metric types should
|
29
|
-
# use a natural hierarchical grouping. For example:
|
30
|
-
#
|
31
|
-
# "custom.googleapis.com/invoice/paid/amount"
|
32
|
-
# "external.googleapis.com/prometheus/up"
|
33
|
-
# "appengine.googleapis.com/http/server/response_latencies"
|
34
|
-
# @!attribute [rw] labels
|
35
|
-
# @return [Array<Google::Api::LabelDescriptor>]
|
36
|
-
# The set of labels that can be used to describe a specific
|
37
|
-
# instance of this metric type. For example, the
|
38
|
-
# `appengine.googleapis.com/http/server/response_latencies` metric
|
39
|
-
# type has a label for the HTTP response code, `response_code`, so
|
40
|
-
# you can look at latencies for successful responses or just
|
41
|
-
# for responses that failed.
|
42
|
-
# @!attribute [rw] metric_kind
|
43
|
-
# @return [Google::Api::MetricDescriptor::MetricKind]
|
44
|
-
# Whether the metric records instantaneous values, changes to a value, etc.
|
45
|
-
# Some combinations of `metric_kind` and `value_type` might not be supported.
|
46
|
-
# @!attribute [rw] value_type
|
47
|
-
# @return [Google::Api::MetricDescriptor::ValueType]
|
48
|
-
# Whether the measurement is an integer, a floating-point number, etc.
|
49
|
-
# Some combinations of `metric_kind` and `value_type` might not be supported.
|
50
|
-
# @!attribute [rw] unit
|
51
|
-
# @return [String]
|
52
|
-
# The units in which the metric value is reported. It is only applicable
|
53
|
-
# if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
|
54
|
-
# defines the representation of the stored metric values.
|
55
|
-
#
|
56
|
-
# Different systems may scale the values to be more easily displayed (so a
|
57
|
-
# value of `0.02KBy` _might_ be displayed as `20By`, and a value of
|
58
|
-
# `3523KBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
|
59
|
-
# `KBy`, then the value of the metric is always in thousands of bytes, no
|
60
|
-
# matter how it may be displayed..
|
61
|
-
#
|
62
|
-
# If you want a custom metric to record the exact number of CPU-seconds used
|
63
|
-
# by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
|
64
|
-
# `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
|
65
|
-
# CPU-seconds, then the value is written as `12005`.
|
66
|
-
#
|
67
|
-
# Alternatively, if you want a custome metric to record data in a more
|
68
|
-
# granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
|
69
|
-
# `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
|
70
|
-
# or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
|
71
|
-
#
|
72
|
-
# The supported units are a subset of [The Unified Code for Units of
|
73
|
-
# Measure](http://unitsofmeasure.org/ucum.html) standard:
|
74
|
-
#
|
75
|
-
# **Basic units (UNIT)**
|
76
|
-
#
|
77
|
-
# * `bit` bit
|
78
|
-
# * `By` byte
|
79
|
-
# * `s` second
|
80
|
-
# * `min` minute
|
81
|
-
# * `h` hour
|
82
|
-
# * `d` day
|
83
|
-
#
|
84
|
-
# **Prefixes (PREFIX)**
|
85
|
-
#
|
86
|
-
# * `k` kilo (10^3)
|
87
|
-
# * `M` mega (10^6)
|
88
|
-
# * `G` giga (10^9)
|
89
|
-
# * `T` tera (10^12)
|
90
|
-
# * `P` peta (10^15)
|
91
|
-
# * `E` exa (10^18)
|
92
|
-
# * `Z` zetta (10^21)
|
93
|
-
# * `Y` yotta (10^24)
|
94
|
-
#
|
95
|
-
# * `m` milli (10^-3)
|
96
|
-
# * `u` micro (10^-6)
|
97
|
-
# * `n` nano (10^-9)
|
98
|
-
# * `p` pico (10^-12)
|
99
|
-
# * `f` femto (10^-15)
|
100
|
-
# * `a` atto (10^-18)
|
101
|
-
# * `z` zepto (10^-21)
|
102
|
-
# * `y` yocto (10^-24)
|
103
|
-
#
|
104
|
-
# * `Ki` kibi (2^10)
|
105
|
-
# * `Mi` mebi (2^20)
|
106
|
-
# * `Gi` gibi (2^30)
|
107
|
-
# * `Ti` tebi (2^40)
|
108
|
-
# * `Pi` pebi (2^50)
|
109
|
-
#
|
110
|
-
# **Grammar**
|
111
|
-
#
|
112
|
-
# The grammar also includes these connectors:
|
113
|
-
#
|
114
|
-
# * `/` division or ratio (as an infix operator). For examples,
|
115
|
-
# `kBy/{email}` or `MiBy/10ms` (although you should almost never
|
116
|
-
# have `/s` in a metric `unit`; rates should always be computed at
|
117
|
-
# query time from the underlying cumulative or delta value).
|
118
|
-
# * `.` multiplication or composition (as an infix operator). For
|
119
|
-
# examples, `GBy.d` or `k{watt}.h`.
|
120
|
-
#
|
121
|
-
# The grammar for a unit is as follows:
|
122
|
-
#
|
123
|
-
# Expression = Component { "." Component } { "/" Component } ;
|
124
|
-
#
|
125
|
-
# Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
|
126
|
-
# | Annotation
|
127
|
-
# | "1"
|
128
|
-
# ;
|
129
|
-
#
|
130
|
-
# Annotation = "{" NAME "}" ;
|
131
|
-
#
|
132
|
-
# Notes:
|
133
|
-
#
|
134
|
-
# * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
|
135
|
-
# is used alone, then the unit is equivalent to `1`. For examples,
|
136
|
-
# `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
|
137
|
-
# * `NAME` is a sequence of non-blank printable ASCII characters not
|
138
|
-
# containing `{` or `}`.
|
139
|
-
# * `1` represents a unitary [dimensionless
|
140
|
-
# unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
|
141
|
-
# as in `1/s`. It is typically used when none of the basic units are
|
142
|
-
# appropriate. For example, "new users per day" can be represented as
|
143
|
-
# `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
|
144
|
-
# users). Alternatively, "thousands of page views per day" would be
|
145
|
-
# represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
|
146
|
-
# value of `5.3` would mean "5300 page views per day").
|
147
|
-
# * `%` represents dimensionless value of 1/100, and annotates values giving
|
148
|
-
# a percentage (so the metric values are typically in the range of 0..100,
|
149
|
-
# and a metric value `3` means "3 percent").
|
150
|
-
# * `10^2.%` indicates a metric contains a ratio, typically in the range
|
151
|
-
# 0..1, that will be multiplied by 100 and displayed as a percentage
|
152
|
-
# (so a metric value `0.03` means "3 percent").
|
153
|
-
# @!attribute [rw] description
|
154
|
-
# @return [String]
|
155
|
-
# A detailed description of the metric, which can be used in documentation.
|
156
|
-
# @!attribute [rw] display_name
|
157
|
-
# @return [String]
|
158
|
-
# A concise name for the metric, which can be displayed in user interfaces.
|
159
|
-
# Use sentence case without an ending period, for example "Request count".
|
160
|
-
# This field is optional but it is recommended to be set for any metrics
|
161
|
-
# associated with user-visible concepts, such as Quota.
|
162
|
-
# @!attribute [rw] metadata
|
163
|
-
# @return [Google::Api::MetricDescriptor::MetricDescriptorMetadata]
|
164
|
-
# Optional. Metadata which can be used to guide usage of the metric.
|
165
|
-
# @!attribute [rw] launch_stage
|
166
|
-
# @return [Google::Api::LaunchStage]
|
167
|
-
# Optional. The launch stage of the metric definition.
|
168
|
-
class MetricDescriptor
|
169
|
-
# Additional annotations that can be used to guide the usage of a metric.
|
170
|
-
# @!attribute [rw] launch_stage
|
171
|
-
# @return [Google::Api::LaunchStage]
|
172
|
-
# Deprecated. Please use the MetricDescriptor.launch_stage instead.
|
173
|
-
# The launch stage of the metric definition.
|
174
|
-
# @!attribute [rw] sample_period
|
175
|
-
# @return [Google::Protobuf::Duration]
|
176
|
-
# The sampling period of metric data points. For metrics which are written
|
177
|
-
# periodically, consecutive data points are stored at this time interval,
|
178
|
-
# excluding data loss due to errors. Metrics with a higher granularity have
|
179
|
-
# a smaller sampling period.
|
180
|
-
# @!attribute [rw] ingest_delay
|
181
|
-
# @return [Google::Protobuf::Duration]
|
182
|
-
# The delay of data points caused by ingestion. Data points older than this
|
183
|
-
# age are guaranteed to be ingested and available to be read, excluding
|
184
|
-
# data loss due to errors.
|
185
|
-
class MetricDescriptorMetadata; end
|
186
|
-
|
187
|
-
# The kind of measurement. It describes how the data is reported.
|
188
|
-
module MetricKind
|
189
|
-
# Do not use this default value.
|
190
|
-
METRIC_KIND_UNSPECIFIED = 0
|
191
|
-
|
192
|
-
# An instantaneous measurement of a value.
|
193
|
-
GAUGE = 1
|
194
|
-
|
195
|
-
# The change in a value during a time interval.
|
196
|
-
DELTA = 2
|
197
|
-
|
198
|
-
# A value accumulated over a time interval. Cumulative
|
199
|
-
# measurements in a time series should have the same start time
|
200
|
-
# and increasing end times, until an event resets the cumulative
|
201
|
-
# value to zero and sets a new start time for the following
|
202
|
-
# points.
|
203
|
-
CUMULATIVE = 3
|
204
|
-
end
|
205
|
-
|
206
|
-
# The value type of a metric.
|
207
|
-
module ValueType
|
208
|
-
# Do not use this default value.
|
209
|
-
VALUE_TYPE_UNSPECIFIED = 0
|
210
|
-
|
211
|
-
# The value is a boolean.
|
212
|
-
# This value type can be used only if the metric kind is `GAUGE`.
|
213
|
-
BOOL = 1
|
214
|
-
|
215
|
-
# The value is a signed 64-bit integer.
|
216
|
-
INT64 = 2
|
217
|
-
|
218
|
-
# The value is a double precision floating point number.
|
219
|
-
DOUBLE = 3
|
220
|
-
|
221
|
-
# The value is a text string.
|
222
|
-
# This value type can be used only if the metric kind is `GAUGE`.
|
223
|
-
STRING = 4
|
224
|
-
|
225
|
-
# The value is a {Google::Api::Distribution `Distribution`}.
|
226
|
-
DISTRIBUTION = 5
|
227
|
-
|
228
|
-
# The value is money.
|
229
|
-
MONEY = 6
|
230
|
-
end
|
231
|
-
end
|
232
|
-
|
233
|
-
# A specific metric, identified by specifying values for all of the
|
234
|
-
# labels of a {Google::Api::MetricDescriptor `MetricDescriptor`}.
|
235
|
-
# @!attribute [rw] type
|
236
|
-
# @return [String]
|
237
|
-
# An existing metric type, see {Google::Api::MetricDescriptor}.
|
238
|
-
# For example, `custom.googleapis.com/invoice/paid/amount`.
|
239
|
-
# @!attribute [rw] labels
|
240
|
-
# @return [Hash{String => String}]
|
241
|
-
# The set of label values that uniquely identify this metric. All
|
242
|
-
# labels listed in the `MetricDescriptor` must be assigned values.
|
243
|
-
class Metric; end
|
244
|
-
end
|
245
|
-
end
|