google-cloud-logging-v2 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1e7ecba38ee2ec7043a34a53f5bce65d54d15b48535a05aff8295f7b7aa89a5
4
- data.tar.gz: 56082eb83b3bbcaf510af9fb94dc0d77526ec1a56a0b545dc7a104b328d9c060
3
+ metadata.gz: 73519b5c444ef6f55a2be0d86d6452ca7c2fbcdf37e1f4a9626ce09a7c9de92e
4
+ data.tar.gz: 3442aaa6fa749dab2ab2ef9f431178063c05b89eddb004b53e40203e08b60487
5
5
  SHA512:
6
- metadata.gz: 22de369f7f8f7695c82eb6967039ab9e60f35dbd109bc8be0281c2c7d8791343a7673d172c9a33bec10c7e2f0232ce698edbc91a0e34d14229d60d3ba349e5e3
7
- data.tar.gz: 7d73cd9d59242767e24912e774adbb693ada99514f8cef7e25dc28b519d30d447555d79e4f23a4e304d8371a1f32ba0cedd663bc09a1bdcd25f9c5389ae3f7ad
6
+ metadata.gz: cc49d52acdb4a7fcee26199b22a618ac3de01f63c764565621110c1bdef2340debeb7cf5b6226fd06990ab06d572d16d33c3d084c2d92d3102d9f70884571c42
7
+ data.tar.gz: a8231b4507852632f605a014fdb29f593d25ea50f1438f3d3eddfdda62d2408823e97c1b4850b6b0d081f290197ab767d1c9a39e7ecf119ed2d7c8dae475e9ac
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-logging-v2
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Logging::V2::ConfigService::Credentials}):
68
68
 
69
- 1. `LOGGING_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `LOGGING_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `LOGGING_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `LOGGING_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/logging/v2"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/logging/v2"
34
34
 
35
35
  client = ::Google::Cloud::Logging::V2::ConfigService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Logging::V2::ListBucketsRequest.new # (request fields as keyword arguments...)
37
37
  response = client.list_buckets request
38
38
  ```
39
39
 
@@ -67,52 +67,34 @@ module Google
67
67
 
68
68
  default_config.rpcs.list_sinks.timeout = 60.0
69
69
  default_config.rpcs.list_sinks.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [4, 13, 14]
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
74
71
  }
75
72
 
76
73
  default_config.rpcs.get_sink.timeout = 60.0
77
74
  default_config.rpcs.get_sink.retry_policy = {
78
- initial_delay: 0.1,
79
- max_delay: 60.0,
80
- multiplier: 1.3,
81
- retry_codes: [4, 13, 14]
75
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
82
76
  }
83
77
 
84
78
  default_config.rpcs.create_sink.timeout = 120.0
85
79
 
86
80
  default_config.rpcs.update_sink.timeout = 60.0
87
81
  default_config.rpcs.update_sink.retry_policy = {
88
- initial_delay: 0.1,
89
- max_delay: 60.0,
90
- multiplier: 1.3,
91
- retry_codes: [4, 13, 14]
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
92
83
  }
93
84
 
94
85
  default_config.rpcs.delete_sink.timeout = 60.0
95
86
  default_config.rpcs.delete_sink.retry_policy = {
96
- initial_delay: 0.1,
97
- max_delay: 60.0,
98
- multiplier: 1.3,
99
- retry_codes: [4, 13, 14]
87
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
100
88
  }
101
89
 
102
90
  default_config.rpcs.list_exclusions.timeout = 60.0
103
91
  default_config.rpcs.list_exclusions.retry_policy = {
104
- initial_delay: 0.1,
105
- max_delay: 60.0,
106
- multiplier: 1.3,
107
- retry_codes: [4, 13, 14]
92
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
108
93
  }
109
94
 
110
95
  default_config.rpcs.get_exclusion.timeout = 60.0
111
96
  default_config.rpcs.get_exclusion.retry_policy = {
112
- initial_delay: 0.1,
113
- max_delay: 60.0,
114
- multiplier: 1.3,
115
- retry_codes: [4, 13, 14]
97
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
116
98
  }
117
99
 
118
100
  default_config.rpcs.create_exclusion.timeout = 120.0
@@ -121,10 +103,7 @@ module Google
121
103
 
122
104
  default_config.rpcs.delete_exclusion.timeout = 60.0
123
105
  default_config.rpcs.delete_exclusion.retry_policy = {
124
- initial_delay: 0.1,
125
- max_delay: 60.0,
126
- multiplier: 1.3,
127
- retry_codes: [4, 13, 14]
106
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
128
107
  }
129
108
 
130
109
  default_config
@@ -195,7 +174,7 @@ module Google
195
174
  !@config.endpoint.split(".").first.include?("-")
196
175
  credentials ||= Credentials.default scope: @config.scope,
197
176
  enable_self_signed_jwt: enable_self_signed_jwt
198
- if credentials.is_a?(String) || credentials.is_a?(Hash)
177
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
199
178
  credentials = Credentials.new credentials, scope: @config.scope
200
179
  end
201
180
  @quota_project_id = @config.quota_project
@@ -67,50 +67,32 @@ module Google
67
67
 
68
68
  default_config.rpcs.delete_log.timeout = 60.0
69
69
  default_config.rpcs.delete_log.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [4, 13, 14]
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
74
71
  }
75
72
 
76
73
  default_config.rpcs.write_log_entries.timeout = 60.0
77
74
  default_config.rpcs.write_log_entries.retry_policy = {
78
- initial_delay: 0.1,
79
- max_delay: 60.0,
80
- multiplier: 1.3,
81
- retry_codes: [4, 13, 14]
75
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
82
76
  }
83
77
 
84
78
  default_config.rpcs.list_log_entries.timeout = 60.0
85
79
  default_config.rpcs.list_log_entries.retry_policy = {
86
- initial_delay: 0.1,
87
- max_delay: 60.0,
88
- multiplier: 1.3,
89
- retry_codes: [4, 13, 14]
80
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
90
81
  }
91
82
 
92
83
  default_config.rpcs.list_monitored_resource_descriptors.timeout = 60.0
93
84
  default_config.rpcs.list_monitored_resource_descriptors.retry_policy = {
94
- initial_delay: 0.1,
95
- max_delay: 60.0,
96
- multiplier: 1.3,
97
- retry_codes: [4, 13, 14]
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
98
86
  }
99
87
 
100
88
  default_config.rpcs.list_logs.timeout = 60.0
101
89
  default_config.rpcs.list_logs.retry_policy = {
102
- initial_delay: 0.1,
103
- max_delay: 60.0,
104
- multiplier: 1.3,
105
- retry_codes: [4, 13, 14]
90
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
106
91
  }
107
92
 
108
93
  default_config.rpcs.tail_log_entries.timeout = 3600.0
109
94
  default_config.rpcs.tail_log_entries.retry_policy = {
110
- initial_delay: 0.1,
111
- max_delay: 60.0,
112
- multiplier: 1.3,
113
- retry_codes: [4, 13, 14]
95
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
114
96
  }
115
97
 
116
98
  default_config
@@ -181,7 +163,7 @@ module Google
181
163
  !@config.endpoint.split(".").first.include?("-")
182
164
  credentials ||= Credentials.default scope: @config.scope,
183
165
  enable_self_signed_jwt: enable_self_signed_jwt
184
- if credentials.is_a?(String) || credentials.is_a?(Hash)
166
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
185
167
  credentials = Credentials.new credentials, scope: @config.scope
186
168
  end
187
169
  @quota_project_id = @config.quota_project
@@ -67,36 +67,24 @@ module Google
67
67
 
68
68
  default_config.rpcs.list_log_metrics.timeout = 60.0
69
69
  default_config.rpcs.list_log_metrics.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [4, 13, 14]
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
74
71
  }
75
72
 
76
73
  default_config.rpcs.get_log_metric.timeout = 60.0
77
74
  default_config.rpcs.get_log_metric.retry_policy = {
78
- initial_delay: 0.1,
79
- max_delay: 60.0,
80
- multiplier: 1.3,
81
- retry_codes: [4, 13, 14]
75
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
82
76
  }
83
77
 
84
78
  default_config.rpcs.create_log_metric.timeout = 60.0
85
79
 
86
80
  default_config.rpcs.update_log_metric.timeout = 60.0
87
81
  default_config.rpcs.update_log_metric.retry_policy = {
88
- initial_delay: 0.1,
89
- max_delay: 60.0,
90
- multiplier: 1.3,
91
- retry_codes: [4, 13, 14]
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
92
83
  }
93
84
 
94
85
  default_config.rpcs.delete_log_metric.timeout = 60.0
95
86
  default_config.rpcs.delete_log_metric.retry_policy = {
96
- initial_delay: 0.1,
97
- max_delay: 60.0,
98
- multiplier: 1.3,
99
- retry_codes: [4, 13, 14]
87
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
100
88
  }
101
89
 
102
90
  default_config
@@ -167,7 +155,7 @@ module Google
167
155
  !@config.endpoint.split(".").first.include?("-")
168
156
  credentials ||= Credentials.default scope: @config.scope,
169
157
  enable_self_signed_jwt: enable_self_signed_jwt
170
- if credentials.is_a?(String) || credentials.is_a?(Hash)
158
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
171
159
  credentials = Credentials.new credentials, scope: @config.scope
172
160
  end
173
161
  @quota_project_id = @config.quota_project
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Logging
23
23
  module V2
24
- VERSION = "0.5.1"
24
+ VERSION = "0.5.2"
25
25
  end
26
26
  end
27
27
  end
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for configuring sinks used to route log entries.
28
28
  class Service
29
29
 
30
- include ::GRPC::GenericService
30
+ include GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for configuring logs-based metrics.
28
28
  class Service
29
29
 
30
- include ::GRPC::GenericService
30
+ include GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for ingesting and querying logs.
28
28
  class Service
29
29
 
30
- include ::GRPC::GenericService
30
+ include GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -49,7 +49,7 @@ module Google
49
49
  #
50
50
  # Sum[i=1..n]((x_i - mean)^2)
51
51
  #
52
- # Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
52
+ # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
53
53
  # describes Welford's method for accumulating this sum in one pass.
54
54
  #
55
55
  # If `count` is zero then this field must be zero.
@@ -207,7 +207,7 @@ module Google
207
207
  # @return [::Array<::Google::Protobuf::Any>]
208
208
  # Contextual information about the example value. Examples are:
209
209
  #
210
- # Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace
210
+ # Trace: type.googleapis.com/google.monitoring.v3.SpanContext
211
211
  #
212
212
  # Literal string: type.googleapis.com/google.protobuf.StringValue
213
213
  #
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # The launch stage as defined by [Google Cloud Platform
23
+ # Launch Stages](http://cloud.google.com/terms/launch-stages).
24
+ module LaunchStage
25
+ # Do not use this default value.
26
+ LAUNCH_STAGE_UNSPECIFIED = 0
27
+
28
+ # The feature is not yet implemented. Users can not use it.
29
+ UNIMPLEMENTED = 6
30
+
31
+ # Prelaunch features are hidden from users and are only visible internally.
32
+ PRELAUNCH = 7
33
+
34
+ # Early Access features are limited to a closed group of testers. To use
35
+ # these features, you must sign up in advance and sign a Trusted Tester
36
+ # agreement (which includes confidentiality provisions). These features may
37
+ # be unstable, changed in backward-incompatible ways, and are not
38
+ # guaranteed to be released.
39
+ EARLY_ACCESS = 1
40
+
41
+ # Alpha is a limited availability test for releases before they are cleared
42
+ # for widespread use. By Alpha, all significant design issues are resolved
43
+ # and we are in the process of verifying functionality. Alpha customers
44
+ # need to apply for access, agree to applicable terms, and have their
45
+ # projects allowlisted. Alpha releases don’t have to be feature complete,
46
+ # no SLAs are provided, and there are no technical support obligations, but
47
+ # they will be far enough along that customers can actually use them in
48
+ # test environments or for limited-use tests -- just like they would in
49
+ # normal production cases.
50
+ ALPHA = 2
51
+
52
+ # Beta is the point at which we are ready to open a release for any
53
+ # customer to use. There are no SLA or technical support obligations in a
54
+ # Beta release. Products will be complete from a feature perspective, but
55
+ # may have some open outstanding issues. Beta releases are suitable for
56
+ # limited production use cases.
57
+ BETA = 3
58
+
59
+ # GA features are open to all developers and are considered stable and
60
+ # fully qualified for production use.
61
+ GA = 4
62
+
63
+ # Deprecated features are scheduled to be shut down and removed. For more
64
+ # information, see the “Deprecation Policy” section of our [Terms of
65
+ # Service](https://cloud.google.com/terms/)
66
+ # and the [Google Cloud Platform Subject to the Deprecation
67
+ # Policy](https://cloud.google.com/terms/deprecation) documentation.
68
+ DEPRECATED = 5
69
+ end
70
+ end
71
+ end
@@ -28,11 +28,12 @@ module Google
28
28
  # @!attribute [rw] type
29
29
  # @return [::String]
30
30
  # The metric type, including its DNS name prefix. The type is not
31
- # URL-encoded. All user-defined custom metric types have the DNS name
32
- # `custom.googleapis.com`. Metric types should use a natural hierarchical
33
- # grouping. For example:
31
+ # URL-encoded. All user-defined metric types have the DNS name
32
+ # `custom.googleapis.com` or `external.googleapis.com`. Metric types should
33
+ # use a natural hierarchical grouping. For example:
34
34
  #
35
35
  # "custom.googleapis.com/invoice/paid/amount"
36
+ # "external.googleapis.com/prometheus/up"
36
37
  # "appengine.googleapis.com/http/server/response_latencies"
37
38
  # @!attribute [rw] labels
38
39
  # @return [::Array<::Google::Api::LabelDescriptor>]
@@ -52,10 +53,28 @@ module Google
52
53
  # Some combinations of `metric_kind` and `value_type` might not be supported.
53
54
  # @!attribute [rw] unit
54
55
  # @return [::String]
55
- # The unit in which the metric value is reported. It is only applicable
56
- # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
57
- # supported units are a subset of [The Unified Code for Units of
58
- # Measure](http://unitsofmeasure.org/ucum.html) standard:
56
+ # The units in which the metric value is reported. It is only applicable
57
+ # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
58
+ # defines the representation of the stored metric values.
59
+ #
60
+ # Different systems might scale the values to be more easily displayed (so a
61
+ # value of `0.02kBy` _might_ be displayed as `20By`, and a value of
62
+ # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
63
+ # `kBy`, then the value of the metric is always in thousands of bytes, no
64
+ # matter how it might be displayed.
65
+ #
66
+ # If you want a custom metric to record the exact number of CPU-seconds used
67
+ # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
68
+ # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
69
+ # CPU-seconds, then the value is written as `12005`.
70
+ #
71
+ # Alternatively, if you want a custom metric to record data in a more
72
+ # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
73
+ # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
74
+ # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
75
+ #
76
+ # The supported units are a subset of [The Unified Code for Units of
77
+ # Measure](https://unitsofmeasure.org/ucum.html) standard:
59
78
  #
60
79
  # **Basic units (UNIT)**
61
80
  #
@@ -65,36 +84,44 @@ module Google
65
84
  # * `min` minute
66
85
  # * `h` hour
67
86
  # * `d` day
87
+ # * `1` dimensionless
68
88
  #
69
89
  # **Prefixes (PREFIX)**
70
90
  #
71
- # * `k` kilo (10**3)
72
- # * `M` mega (10**6)
73
- # * `G` giga (10**9)
74
- # * `T` tera (10**12)
75
- # * `P` peta (10**15)
76
- # * `E` exa (10**18)
77
- # * `Z` zetta (10**21)
78
- # * `Y` yotta (10**24)
79
- # * `m` milli (10**-3)
80
- # * `u` micro (10**-6)
81
- # * `n` nano (10**-9)
82
- # * `p` pico (10**-12)
83
- # * `f` femto (10**-15)
84
- # * `a` atto (10**-18)
85
- # * `z` zepto (10**-21)
86
- # * `y` yocto (10**-24)
87
- # * `Ki` kibi (2**10)
88
- # * `Mi` mebi (2**20)
89
- # * `Gi` gibi (2**30)
90
- # * `Ti` tebi (2**40)
91
+ # * `k` kilo (10^3)
92
+ # * `M` mega (10^6)
93
+ # * `G` giga (10^9)
94
+ # * `T` tera (10^12)
95
+ # * `P` peta (10^15)
96
+ # * `E` exa (10^18)
97
+ # * `Z` zetta (10^21)
98
+ # * `Y` yotta (10^24)
99
+ #
100
+ # * `m` milli (10^-3)
101
+ # * `u` micro (10^-6)
102
+ # * `n` nano (10^-9)
103
+ # * `p` pico (10^-12)
104
+ # * `f` femto (10^-15)
105
+ # * `a` atto (10^-18)
106
+ # * `z` zepto (10^-21)
107
+ # * `y` yocto (10^-24)
108
+ #
109
+ # * `Ki` kibi (2^10)
110
+ # * `Mi` mebi (2^20)
111
+ # * `Gi` gibi (2^30)
112
+ # * `Ti` tebi (2^40)
113
+ # * `Pi` pebi (2^50)
91
114
  #
92
115
  # **Grammar**
93
116
  #
94
117
  # The grammar also includes these connectors:
95
118
  #
96
- # * `/` division (as an infix operator, e.g. `1/s`).
97
- # * `.` multiplication (as an infix operator, e.g. `GBy.d`)
119
+ # * `/` division or ratio (as an infix operator). For examples,
120
+ # `kBy/{email}` or `MiBy/10ms` (although you should almost never
121
+ # have `/s` in a metric `unit`; rates should always be computed at
122
+ # query time from the underlying cumulative or delta value).
123
+ # * `.` multiplication or composition (as an infix operator). For
124
+ # examples, `GBy.d` or `k{watt}.h`.
98
125
  #
99
126
  # The grammar for a unit is as follows:
100
127
  #
@@ -109,14 +136,25 @@ module Google
109
136
  #
110
137
  # Notes:
111
138
  #
112
- # * `Annotation` is just a comment if it follows a `UNIT` and is
113
- # equivalent to `1` if it is used alone. For examples,
114
- # `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
139
+ # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
140
+ # is used alone, then the unit is equivalent to `1`. For examples,
141
+ # `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
115
142
  # * `NAME` is a sequence of non-blank printable ASCII characters not
116
- # containing '\\{' or '}'.
117
- # * `1` represents dimensionless value 1, such as in `1/s`.
118
- # * `%` represents dimensionless value 1/100, and annotates values giving
119
- # a percentage.
143
+ # containing `{` or `}`.
144
+ # * `1` represents a unitary [dimensionless
145
+ # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
146
+ # as in `1/s`. It is typically used when none of the basic units are
147
+ # appropriate. For example, "new users per day" can be represented as
148
+ # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
149
+ # users). Alternatively, "thousands of page views per day" would be
150
+ # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
151
+ # value of `5.3` would mean "5300 page views per day").
152
+ # * `%` represents dimensionless value of 1/100, and annotates values giving
153
+ # a percentage (so the metric values are typically in the range of 0..100,
154
+ # and a metric value `3` means "3 percent").
155
+ # * `10^2.%` indicates a metric contains a ratio, typically in the range
156
+ # 0..1, that will be multiplied by 100 and displayed as a percentage
157
+ # (so a metric value `0.03` means "3 percent").
120
158
  # @!attribute [rw] description
121
159
  # @return [::String]
122
160
  # A detailed description of the metric, which can be used in documentation.
@@ -126,11 +164,46 @@ module Google
126
164
  # Use sentence case without an ending period, for example "Request count".
127
165
  # This field is optional but it is recommended to be set for any metrics
128
166
  # associated with user-visible concepts, such as Quota.
167
+ # @!attribute [rw] metadata
168
+ # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata]
169
+ # Optional. Metadata which can be used to guide usage of the metric.
170
+ # @!attribute [rw] launch_stage
171
+ # @return [::Google::Api::LaunchStage]
172
+ # Optional. The launch stage of the metric definition.
173
+ # @!attribute [rw] monitored_resource_types
174
+ # @return [::Array<::String>]
175
+ # Read-only. If present, then a [time
176
+ # series][google.monitoring.v3.TimeSeries], which is identified partially by
177
+ # a metric type and a {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor}, that is associated
178
+ # with this metric type can only be associated with one of the monitored
179
+ # resource types listed here.
129
180
  class MetricDescriptor
130
181
  include ::Google::Protobuf::MessageExts
131
182
  extend ::Google::Protobuf::MessageExts::ClassMethods
132
183
 
184
+ # Additional annotations that can be used to guide the usage of a metric.
185
+ # @!attribute [rw] launch_stage
186
+ # @return [::Google::Api::LaunchStage]
187
+ # Deprecated. Must use the {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} instead.
188
+ # @!attribute [rw] sample_period
189
+ # @return [::Google::Protobuf::Duration]
190
+ # The sampling period of metric data points. For metrics which are written
191
+ # periodically, consecutive data points are stored at this time interval,
192
+ # excluding data loss due to errors. Metrics with a higher granularity have
193
+ # a smaller sampling period.
194
+ # @!attribute [rw] ingest_delay
195
+ # @return [::Google::Protobuf::Duration]
196
+ # The delay of data points caused by ingestion. Data points older than this
197
+ # age are guaranteed to be ingested and available to be read, excluding
198
+ # data loss due to errors.
199
+ class MetricDescriptorMetadata
200
+ include ::Google::Protobuf::MessageExts
201
+ extend ::Google::Protobuf::MessageExts::ClassMethods
202
+ end
203
+
133
204
  # The kind of measurement. It describes how the data is reported.
205
+ # For information on setting the start time and end time based on
206
+ # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval].
134
207
  module MetricKind
135
208
  # Do not use this default value.
136
209
  METRIC_KIND_UNSPECIFIED = 0
@@ -40,7 +40,6 @@ module Google
40
40
  # @return [::String]
41
41
  # Required. The monitored resource type. For example, the type
42
42
  # `"cloudsql_database"` represents databases in Google Cloud SQL.
43
- # The maximum length of this value is 256 characters.
44
43
  # @!attribute [rw] display_name
45
44
  # @return [::String]
46
45
  # Optional. A concise name for the monitored resource type that might be
@@ -56,6 +55,9 @@ module Google
56
55
  # Required. A set of labels used to describe instances of this monitored
57
56
  # resource type. For example, an individual Google Cloud SQL database is
58
57
  # identified by values for the labels `"database_id"` and `"zone"`.
58
+ # @!attribute [rw] launch_stage
59
+ # @return [::Google::Api::LaunchStage]
60
+ # Optional. The launch stage of the monitored resource definition.
59
61
  class MonitoredResourceDescriptor
60
62
  include ::Google::Protobuf::MessageExts
61
63
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -101,15 +103,14 @@ module Google
101
103
  # Auxiliary metadata for a {::Google::Api::MonitoredResource MonitoredResource} object.
102
104
  # {::Google::Api::MonitoredResource MonitoredResource} objects contain the minimum set of information to
103
105
  # uniquely identify a monitored resource instance. There is some other useful
104
- # auxiliary metadata. Google Stackdriver Monitoring & Logging uses an ingestion
105
- # pipeline to extract metadata for cloud resources of all types , and stores
106
+ # auxiliary metadata. Monitoring and Logging use an ingestion
107
+ # pipeline to extract metadata for cloud resources of all types, and store
106
108
  # the metadata in this message.
107
109
  # @!attribute [rw] system_labels
108
110
  # @return [::Google::Protobuf::Struct]
109
111
  # Output only. Values for predefined system metadata labels.
110
- # System labels are a kind of metadata extracted by Google Stackdriver.
111
- # Stackdriver determines what system labels are useful and how to obtain
112
- # their values. Some examples: "machine_image", "vpc", "subnet_id",
112
+ # System labels are a kind of metadata extracted by Google, including
113
+ # "machine_image", "vpc", "subnet_id",
113
114
  # "security_group", "name", etc.
114
115
  # System label values can be only strings, Boolean values, or a list of
115
116
  # strings. For example:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-logging-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -185,8 +185,6 @@ files:
185
185
  - lib/google/cloud/logging/v2/metrics_service/credentials.rb
186
186
  - lib/google/cloud/logging/v2/metrics_service/paths.rb
187
187
  - lib/google/cloud/logging/v2/version.rb
188
- - lib/google/logging/type/http_request_pb.rb
189
- - lib/google/logging/type/log_severity_pb.rb
190
188
  - lib/google/logging/v2/log_entry_pb.rb
191
189
  - lib/google/logging/v2/logging_config_pb.rb
192
190
  - lib/google/logging/v2/logging_config_services_pb.rb
@@ -198,6 +196,7 @@ files:
198
196
  - proto_docs/google/api/distribution.rb
199
197
  - proto_docs/google/api/field_behavior.rb
200
198
  - proto_docs/google/api/label.rb
199
+ - proto_docs/google/api/launch_stage.rb
201
200
  - proto_docs/google/api/metric.rb
202
201
  - proto_docs/google/api/monitored_resource.rb
203
202
  - proto_docs/google/api/resource.rb
@@ -1,38 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/logging/type/http_request.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/protobuf/duration_pb'
7
- require 'google/api/annotations_pb'
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/logging/type/http_request.proto", :syntax => :proto3) do
10
- add_message "google.logging.type.HttpRequest" do
11
- optional :request_method, :string, 1
12
- optional :request_url, :string, 2
13
- optional :request_size, :int64, 3
14
- optional :status, :int32, 4
15
- optional :response_size, :int64, 5
16
- optional :user_agent, :string, 6
17
- optional :remote_ip, :string, 7
18
- optional :server_ip, :string, 13
19
- optional :referer, :string, 8
20
- optional :latency, :message, 14, "google.protobuf.Duration"
21
- optional :cache_lookup, :bool, 11
22
- optional :cache_hit, :bool, 9
23
- optional :cache_validated_with_origin_server, :bool, 10
24
- optional :cache_fill_bytes, :int64, 12
25
- optional :protocol, :string, 15
26
- end
27
- end
28
- end
29
-
30
- module Google
31
- module Cloud
32
- module Logging
33
- module Type
34
- HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.type.HttpRequest").msgclass
35
- end
36
- end
37
- end
38
- end
@@ -1,31 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/logging/type/log_severity.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/api/annotations_pb'
7
- Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_file("google/logging/type/log_severity.proto", :syntax => :proto3) do
9
- add_enum "google.logging.type.LogSeverity" do
10
- value :DEFAULT, 0
11
- value :DEBUG, 100
12
- value :INFO, 200
13
- value :NOTICE, 300
14
- value :WARNING, 400
15
- value :ERROR, 500
16
- value :CRITICAL, 600
17
- value :ALERT, 700
18
- value :EMERGENCY, 800
19
- end
20
- end
21
- end
22
-
23
- module Google
24
- module Cloud
25
- module Logging
26
- module Type
27
- LogSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.type.LogSeverity").enummodule
28
- end
29
- end
30
- end
31
- end