google-cloud-monitoring 1.1.0 → 1.3.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 +8 -8
- data/lib/google/cloud/monitoring/metrics_scope/version.rb +29 -0
- data/lib/google/cloud/monitoring/metrics_scope.rb +118 -0
- data/lib/google/cloud/monitoring/version.rb +1 -1
- data/lib/google/cloud/monitoring.rb +32 -0
- data/lib/google-cloud-monitoring.rb +1 -0
- metadata +45 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44049e8e18abb61468f2f71f4c1fb6ab145533dd30438f302fecb5453899bb8f
|
4
|
+
data.tar.gz: df306b539254738a88a2ce4e4b71b742d2a0daff37738a9b8c37e7f0e5f572a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ced08d7699b16685885ea61d62f45eef94d03f3ba2afcb200751eb21d96c965c73daae9c79ebabf319c8f4cc77ed7c6809e121bf171a0ff658730c576b9fbf
|
7
|
+
data.tar.gz: 88dc32d2f2ce6282406b9719e10f9353af09f815b710dc2a2536185ce249e9c075321a1c0418b4fe010aeaf757b96f8f7d8ab99ae67f6d332ed58215de70f5f4
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-monitoring
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
`::Google::Cloud::Monitoring::V3::AlertPolicyService::Credentials`):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `MONITORING_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `MONITORING_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/monitoring"
|
@@ -82,8 +82,8 @@ client = Google::Cloud::Monitoring.alert_policy_service
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/monitoring"
|
@@ -93,7 +93,7 @@ client = Google::Cloud::Monitoring.alert_policy_service do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/monitoring"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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 Cloud
|
22
|
+
module Monitoring
|
23
|
+
module MetricsScope
|
24
|
+
# @private
|
25
|
+
VERSION = ""
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,118 @@
|
|
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
|
+
# Require this file early so that the version constant gets defined before
|
20
|
+
# requiring "google/cloud". This is because google-cloud-core will load the
|
21
|
+
# entrypoint (gem name) file, which in turn re-requires this file (hence
|
22
|
+
# causing a require cycle) unless the version constant is already defined.
|
23
|
+
require "google/cloud/monitoring/metrics_scope/version"
|
24
|
+
|
25
|
+
require "googleauth"
|
26
|
+
gem "google-cloud-core"
|
27
|
+
require "google/cloud" unless defined? ::Google::Cloud.new
|
28
|
+
require "google/cloud/config"
|
29
|
+
|
30
|
+
# Set the default configuration
|
31
|
+
::Google::Cloud.configure.add_config! :monitoring_metrics_scope do |config|
|
32
|
+
config.add_field! :endpoint, "monitoring.googleapis.com", match: ::String
|
33
|
+
config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
|
34
|
+
config.add_field! :scope, nil, match: [::Array, ::String]
|
35
|
+
config.add_field! :lib_name, nil, match: ::String
|
36
|
+
config.add_field! :lib_version, nil, match: ::String
|
37
|
+
config.add_field! :interceptors, nil, match: ::Array
|
38
|
+
config.add_field! :timeout, nil, match: ::Numeric
|
39
|
+
config.add_field! :metadata, nil, match: ::Hash
|
40
|
+
config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
|
41
|
+
config.add_field! :quota_project, nil, match: ::String
|
42
|
+
end
|
43
|
+
|
44
|
+
module Google
|
45
|
+
module Cloud
|
46
|
+
module Monitoring
|
47
|
+
module MetricsScope
|
48
|
+
##
|
49
|
+
# Create a new client object for MetricsScopes.
|
50
|
+
#
|
51
|
+
# By default, this returns an instance of
|
52
|
+
# [Google::Cloud::Monitoring::MetricsScope::V1::MetricsScopes::Client](https://googleapis.dev/ruby/google-cloud-monitoring-metrics_scope-v1/latest/Google/Cloud/Monitoring/MetricsScope/V1/MetricsScopes/Client.html)
|
53
|
+
# for version V1 of the API.
|
54
|
+
# However, you can specify specify a different API version by passing it in the
|
55
|
+
# `version` parameter. If the MetricsScopes service is
|
56
|
+
# supported by that API version, and the corresponding gem is available, the
|
57
|
+
# appropriate versioned client will be returned.
|
58
|
+
#
|
59
|
+
# ## About MetricsScopes
|
60
|
+
#
|
61
|
+
# Manages Cloud Monitoring Metrics Scopes, and the monitoring of Google Cloud
|
62
|
+
# projects and AWS accounts.
|
63
|
+
#
|
64
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
65
|
+
# Defaults to `:v1`.
|
66
|
+
# @return [MetricsScopes::Client] A client object for the specified version.
|
67
|
+
#
|
68
|
+
def self.metrics_scopes version: :v1, &block
|
69
|
+
require "google/cloud/monitoring/metrics_scope/#{version.to_s.downcase}"
|
70
|
+
|
71
|
+
package_name = Google::Cloud::Monitoring::MetricsScope
|
72
|
+
.constants
|
73
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
74
|
+
.first
|
75
|
+
package_module = Google::Cloud::Monitoring::MetricsScope.const_get package_name
|
76
|
+
package_module.const_get(:MetricsScopes).const_get(:Client).new(&block)
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# Configure the google-cloud-monitoring-metrics_scope library.
|
81
|
+
#
|
82
|
+
# The following configuration parameters are supported:
|
83
|
+
#
|
84
|
+
# * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) -
|
85
|
+
# The path to the keyfile as a String, the contents of the keyfile as a
|
86
|
+
# Hash, or a Google::Auth::Credentials object.
|
87
|
+
# * `lib_name` (*type:* `String`) -
|
88
|
+
# The library name as recorded in instrumentation and logging.
|
89
|
+
# * `lib_version` (*type:* `String`) -
|
90
|
+
# The library version as recorded in instrumentation and logging.
|
91
|
+
# * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
|
92
|
+
# An array of interceptors that are run before calls are executed.
|
93
|
+
# * `timeout` (*type:* `Numeric`) -
|
94
|
+
# Default timeout in seconds.
|
95
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) -
|
96
|
+
# Additional gRPC headers to be sent with the call.
|
97
|
+
# * `retry_policy` (*type:* `Hash`) -
|
98
|
+
# The retry policy. The value is a hash with the following keys:
|
99
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
100
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
101
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
102
|
+
# * `:retry_codes` (*type:* `Array<String>`) -
|
103
|
+
# The error codes that should trigger a retry.
|
104
|
+
#
|
105
|
+
# @return [::Google::Cloud::Config] The default configuration used by this library
|
106
|
+
#
|
107
|
+
def self.configure
|
108
|
+
yield ::Google::Cloud.configure.monitoring_metrics_scope if block_given?
|
109
|
+
|
110
|
+
::Google::Cloud.configure.monitoring_metrics_scope
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
helper_path = ::File.join __dir__, "metrics_scope", "helpers.rb"
|
118
|
+
require "google/cloud/monitoring/metrics_scope/helpers" if ::File.file? helper_path
|
@@ -185,6 +185,38 @@ module Google
|
|
185
185
|
package_module.const_get(:NotificationChannelService).const_get(:Client).new(&block)
|
186
186
|
end
|
187
187
|
|
188
|
+
##
|
189
|
+
# Create a new client object for QueryService.
|
190
|
+
#
|
191
|
+
# By default, this returns an instance of
|
192
|
+
# [Google::Cloud::Monitoring::V3::QueryService::Client](https://googleapis.dev/ruby/google-cloud-monitoring-v3/latest/Google/Cloud/Monitoring/V3/QueryService/Client.html)
|
193
|
+
# for version V3 of the API.
|
194
|
+
# However, you can specify specify a different API version by passing it in the
|
195
|
+
# `version` parameter. If the QueryService service is
|
196
|
+
# supported by that API version, and the corresponding gem is available, the
|
197
|
+
# appropriate versioned client will be returned.
|
198
|
+
#
|
199
|
+
# ## About QueryService
|
200
|
+
#
|
201
|
+
# The QueryService API is used to manage time series data in Stackdriver
|
202
|
+
# Monitoring. Time series data is a collection of data points that describes
|
203
|
+
# the time-varying values of a metric.
|
204
|
+
#
|
205
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
206
|
+
# Defaults to `:v3`.
|
207
|
+
# @return [QueryService::Client] A client object for the specified version.
|
208
|
+
#
|
209
|
+
def self.query_service version: :v3, &block
|
210
|
+
require "google/cloud/monitoring/#{version.to_s.downcase}"
|
211
|
+
|
212
|
+
package_name = Google::Cloud::Monitoring
|
213
|
+
.constants
|
214
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
215
|
+
.first
|
216
|
+
package_module = Google::Cloud::Monitoring.const_get package_name
|
217
|
+
package_module.const_get(:QueryService).const_get(:Client).new(&block)
|
218
|
+
end
|
219
|
+
|
188
220
|
##
|
189
221
|
# Create a new client object for ServiceMonitoringService.
|
190
222
|
#
|
@@ -18,3 +18,4 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/monitoring" unless defined? Google::Cloud::Monitoring::VERSION
|
20
20
|
require "google/cloud/monitoring/dashboard" unless defined? Google::Cloud::Monitoring::Dashboard::VERSION
|
21
|
+
require "google/cloud/monitoring/metrics_scope" unless defined? Google::Cloud::Monitoring::MetricsScope::VERSION
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-monitoring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
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-
|
11
|
+
date: 2021-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|
@@ -16,42 +16,74 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: google-cloud-monitoring-v3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.4'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 2.a
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
43
|
+
version: '0.4'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.a
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: google-cloud-monitoring-dashboard-v1
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - "
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.5'
|
54
|
+
- - "<"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 2.a
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0.5'
|
64
|
+
- - "<"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 2.a
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: google-cloud-monitoring-metrics_scope-v1
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
46
72
|
- !ruby/object:Gem::Version
|
47
73
|
version: '0.0'
|
74
|
+
- - "<"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 2.a
|
48
77
|
type: :runtime
|
49
78
|
prerelease: false
|
50
79
|
version_requirements: !ruby/object:Gem::Requirement
|
51
80
|
requirements:
|
52
|
-
- - "
|
81
|
+
- - ">="
|
53
82
|
- !ruby/object:Gem::Version
|
54
83
|
version: '0.0'
|
84
|
+
- - "<"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 2.a
|
55
87
|
- !ruby/object:Gem::Dependency
|
56
88
|
name: google-style
|
57
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,6 +212,8 @@ files:
|
|
180
212
|
- lib/google/cloud/monitoring.rb
|
181
213
|
- lib/google/cloud/monitoring/dashboard.rb
|
182
214
|
- lib/google/cloud/monitoring/dashboard/version.rb
|
215
|
+
- lib/google/cloud/monitoring/metrics_scope.rb
|
216
|
+
- lib/google/cloud/monitoring/metrics_scope/version.rb
|
183
217
|
- lib/google/cloud/monitoring/version.rb
|
184
218
|
homepage: https://github.com/googleapis/google-cloud-ruby
|
185
219
|
licenses:
|
@@ -200,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
234
|
- !ruby/object:Gem::Version
|
201
235
|
version: '0'
|
202
236
|
requirements: []
|
203
|
-
rubygems_version: 3.2.
|
237
|
+
rubygems_version: 3.2.17
|
204
238
|
signing_key:
|
205
239
|
specification_version: 4
|
206
240
|
summary: API Client library for the Cloud Monitoring API
|