google-cloud-logging 1.10.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +2 -1
- data/CHANGELOG.md +47 -0
- data/TROUBLESHOOTING.md +2 -8
- data/lib/google-cloud-logging.rb +14 -15
- data/lib/google/cloud/logging.rb +12 -13
- data/lib/google/cloud/logging/credentials.rb +2 -2
- data/lib/google/cloud/logging/entry.rb +5 -5
- data/lib/google/cloud/logging/entry/http_request.rb +3 -3
- data/lib/google/cloud/logging/entry/list.rb +1 -1
- data/lib/google/cloud/logging/entry/operation.rb +3 -3
- data/lib/google/cloud/logging/entry/source_location.rb +3 -3
- data/lib/google/cloud/logging/log/list.rb +1 -1
- data/lib/google/cloud/logging/metric.rb +2 -2
- data/lib/google/cloud/logging/metric/list.rb +1 -1
- data/lib/google/cloud/logging/resource_descriptor/list.rb +1 -1
- data/lib/google/cloud/logging/service.rb +70 -173
- data/lib/google/cloud/logging/sink.rb +2 -2
- data/lib/google/cloud/logging/sink/list.rb +1 -1
- data/lib/google/cloud/logging/version.rb +1 -1
- metadata +11 -81
- data/lib/google/cloud/logging/v2.rb +0 -18
- data/lib/google/cloud/logging/v2/config_service_v2_client.rb +0 -1368
- data/lib/google/cloud/logging/v2/config_service_v2_client_config.json +0 -101
- data/lib/google/cloud/logging/v2/credentials.rb +0 -39
- data/lib/google/cloud/logging/v2/doc/google/api/distribution.rb +0 -164
- data/lib/google/cloud/logging/v2/doc/google/api/label.rb +0 -42
- data/lib/google/cloud/logging/v2/doc/google/api/metric.rb +0 -233
- data/lib/google/cloud/logging/v2/doc/google/api/monitored_resource.rb +0 -85
- data/lib/google/cloud/logging/v2/doc/google/logging/type/http_request.rb +0 -86
- data/lib/google/cloud/logging/v2/doc/google/logging/v2/log_entry.rb +0 -179
- data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging.rb +0 -238
- data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_config.rb +0 -660
- data/lib/google/cloud/logging/v2/doc/google/logging/v2/logging_metrics.rb +0 -220
- data/lib/google/cloud/logging/v2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/logging/v2/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/logging/v2/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/logging/v2/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/logging/v2/doc/google/protobuf/struct.rb +0 -74
- data/lib/google/cloud/logging/v2/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/logging/v2/logging_service_v2_client.rb +0 -680
- data/lib/google/cloud/logging/v2/logging_service_v2_client_config.json +0 -56
- data/lib/google/cloud/logging/v2/metrics_service_v2_client.rb +0 -475
- data/lib/google/cloud/logging/v2/metrics_service_v2_client_config.json +0 -51
- data/lib/google/logging/v2/log_entry_pb.rb +0 -59
- data/lib/google/logging/v2/logging_config_pb.rb +0 -173
- data/lib/google/logging/v2/logging_config_services_pb.rb +0 -112
- data/lib/google/logging/v2/logging_metrics_pb.rb +0 -72
- data/lib/google/logging/v2/logging_metrics_services_pb.rb +0 -52
- data/lib/google/logging/v2/logging_pb.rb +0 -80
- data/lib/google/logging/v2/logging_services_pb.rb +0 -64
@@ -1,101 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"interfaces": {
|
3
|
-
"google.logging.v2.ConfigServiceV2": {
|
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
|
-
"ListBuckets": {
|
24
|
-
"timeout_millis": 60000,
|
25
|
-
"retry_codes_name": "idempotent",
|
26
|
-
"retry_params_name": "default"
|
27
|
-
},
|
28
|
-
"GetBucket": {
|
29
|
-
"timeout_millis": 60000,
|
30
|
-
"retry_codes_name": "idempotent",
|
31
|
-
"retry_params_name": "default"
|
32
|
-
},
|
33
|
-
"UpdateBucket": {
|
34
|
-
"timeout_millis": 60000,
|
35
|
-
"retry_codes_name": "non_idempotent",
|
36
|
-
"retry_params_name": "default"
|
37
|
-
},
|
38
|
-
"ListSinks": {
|
39
|
-
"timeout_millis": 60000,
|
40
|
-
"retry_codes_name": "idempotent",
|
41
|
-
"retry_params_name": "default"
|
42
|
-
},
|
43
|
-
"GetSink": {
|
44
|
-
"timeout_millis": 60000,
|
45
|
-
"retry_codes_name": "idempotent",
|
46
|
-
"retry_params_name": "default"
|
47
|
-
},
|
48
|
-
"CreateSink": {
|
49
|
-
"timeout_millis": 60000,
|
50
|
-
"retry_codes_name": "non_idempotent",
|
51
|
-
"retry_params_name": "default"
|
52
|
-
},
|
53
|
-
"UpdateSink": {
|
54
|
-
"timeout_millis": 60000,
|
55
|
-
"retry_codes_name": "non_idempotent",
|
56
|
-
"retry_params_name": "default"
|
57
|
-
},
|
58
|
-
"DeleteSink": {
|
59
|
-
"timeout_millis": 60000,
|
60
|
-
"retry_codes_name": "non_idempotent",
|
61
|
-
"retry_params_name": "default"
|
62
|
-
},
|
63
|
-
"ListExclusions": {
|
64
|
-
"timeout_millis": 60000,
|
65
|
-
"retry_codes_name": "idempotent",
|
66
|
-
"retry_params_name": "default"
|
67
|
-
},
|
68
|
-
"GetExclusion": {
|
69
|
-
"timeout_millis": 60000,
|
70
|
-
"retry_codes_name": "idempotent",
|
71
|
-
"retry_params_name": "default"
|
72
|
-
},
|
73
|
-
"CreateExclusion": {
|
74
|
-
"timeout_millis": 60000,
|
75
|
-
"retry_codes_name": "non_idempotent",
|
76
|
-
"retry_params_name": "default"
|
77
|
-
},
|
78
|
-
"UpdateExclusion": {
|
79
|
-
"timeout_millis": 60000,
|
80
|
-
"retry_codes_name": "non_idempotent",
|
81
|
-
"retry_params_name": "default"
|
82
|
-
},
|
83
|
-
"DeleteExclusion": {
|
84
|
-
"timeout_millis": 60000,
|
85
|
-
"retry_codes_name": "non_idempotent",
|
86
|
-
"retry_params_name": "default"
|
87
|
-
},
|
88
|
-
"GetCmekSettings": {
|
89
|
-
"timeout_millis": 60000,
|
90
|
-
"retry_codes_name": "idempotent",
|
91
|
-
"retry_params_name": "default"
|
92
|
-
},
|
93
|
-
"UpdateCmekSettings": {
|
94
|
-
"timeout_millis": 60000,
|
95
|
-
"retry_codes_name": "non_idempotent",
|
96
|
-
"retry_params_name": "default"
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}
|
@@ -1,39 +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 Logging
|
21
|
-
module V2
|
22
|
-
class Credentials < Google::Auth::Credentials
|
23
|
-
SCOPE = ["https://www.googleapis.com/auth/logging.admin"].freeze
|
24
|
-
PATH_ENV_VARS = %w(LOGGING_CREDENTIALS
|
25
|
-
LOGGING_KEYFILE
|
26
|
-
GOOGLE_CLOUD_CREDENTIALS
|
27
|
-
GOOGLE_CLOUD_KEYFILE
|
28
|
-
GCLOUD_KEYFILE)
|
29
|
-
JSON_ENV_VARS = %w(LOGGING_CREDENTIALS_JSON
|
30
|
-
LOGGING_KEYFILE_JSON
|
31
|
-
GOOGLE_CLOUD_CREDENTIALS_JSON
|
32
|
-
GOOGLE_CLOUD_KEYFILE_JSON
|
33
|
-
GCLOUD_KEYFILE_JSON)
|
34
|
-
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,164 +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
|
-
# `BucketOptions` describes the bucket boundaries used to create a histogram
|
82
|
-
# for the distribution. The buckets can be in a linear sequence, an
|
83
|
-
# exponential sequence, or each bucket can be specified explicitly.
|
84
|
-
# `BucketOptions` does not include the number of values in each bucket.
|
85
|
-
#
|
86
|
-
# A bucket has an inclusive lower bound and exclusive upper bound for the
|
87
|
-
# values that are counted for that bucket. The upper bound of a bucket must
|
88
|
-
# be strictly greater than the lower bound. The sequence of N buckets for a
|
89
|
-
# distribution consists of an underflow bucket (number 0), zero or more
|
90
|
-
# finite buckets (number 1 through N - 2) and an overflow bucket (number N -
|
91
|
-
# 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
|
92
|
-
# same as the upper bound of bucket i - 1. The buckets span the whole range
|
93
|
-
# of finite values: lower bound of the underflow bucket is -infinity and the
|
94
|
-
# upper bound of the overflow bucket is +infinity. The finite buckets are
|
95
|
-
# so-called because both bounds are finite.
|
96
|
-
# @!attribute [rw] linear_buckets
|
97
|
-
# @return [Google::Api::Distribution::BucketOptions::Linear]
|
98
|
-
# The linear bucket.
|
99
|
-
# @!attribute [rw] exponential_buckets
|
100
|
-
# @return [Google::Api::Distribution::BucketOptions::Exponential]
|
101
|
-
# The exponential buckets.
|
102
|
-
# @!attribute [rw] explicit_buckets
|
103
|
-
# @return [Google::Api::Distribution::BucketOptions::Explicit]
|
104
|
-
# The explicit buckets.
|
105
|
-
class BucketOptions
|
106
|
-
# Specifies a linear sequence of buckets that all have the same width
|
107
|
-
# (except overflow and underflow). Each bucket represents a constant
|
108
|
-
# absolute uncertainty on the specific value in the bucket.
|
109
|
-
#
|
110
|
-
# There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
|
111
|
-
# following boundaries:
|
112
|
-
#
|
113
|
-
# Upper bound (0 <= i < N-1): offset + (width * i).
|
114
|
-
# Lower bound (1 <= i < N): offset + (width * (i - 1)).
|
115
|
-
# @!attribute [rw] num_finite_buckets
|
116
|
-
# @return [Integer]
|
117
|
-
# Must be greater than 0.
|
118
|
-
# @!attribute [rw] width
|
119
|
-
# @return [Float]
|
120
|
-
# Must be greater than 0.
|
121
|
-
# @!attribute [rw] offset
|
122
|
-
# @return [Float]
|
123
|
-
# Lower bound of the first bucket.
|
124
|
-
class Linear; end
|
125
|
-
|
126
|
-
# Specifies an exponential sequence of buckets that have a width that is
|
127
|
-
# proportional to the value of the lower bound. Each bucket represents a
|
128
|
-
# constant relative uncertainty on a specific value in the bucket.
|
129
|
-
#
|
130
|
-
# There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
|
131
|
-
# following boundaries:
|
132
|
-
#
|
133
|
-
# Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).
|
134
|
-
# Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
|
135
|
-
# @!attribute [rw] num_finite_buckets
|
136
|
-
# @return [Integer]
|
137
|
-
# Must be greater than 0.
|
138
|
-
# @!attribute [rw] growth_factor
|
139
|
-
# @return [Float]
|
140
|
-
# Must be greater than 1.
|
141
|
-
# @!attribute [rw] scale
|
142
|
-
# @return [Float]
|
143
|
-
# Must be greater than 0.
|
144
|
-
class Exponential; end
|
145
|
-
|
146
|
-
# Specifies a set of buckets with arbitrary widths.
|
147
|
-
#
|
148
|
-
# There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
|
149
|
-
# boundaries:
|
150
|
-
#
|
151
|
-
# Upper bound (0 <= i < N-1): bounds[i]
|
152
|
-
# Lower bound (1 <= i < N); bounds[i - 1]
|
153
|
-
#
|
154
|
-
# The `bounds` field must contain at least one element. If `bounds` has
|
155
|
-
# only one element, then there are no finite buckets, and that single
|
156
|
-
# element is the common boundary of the overflow and underflow buckets.
|
157
|
-
# @!attribute [rw] bounds
|
158
|
-
# @return [Array<Float>]
|
159
|
-
# The values must be monotonically increasing.
|
160
|
-
class Explicit; end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
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,233 +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
|
-
end
|
233
|
-
end
|