vmik-fluent-plugin-google-cloud 0.5.5 → 0.6.4.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dd6ec43bee3095a2684e5f5abc1cbc5571bdc63b
4
+ data.tar.gz: d4bc8540a6493308b7d8dd4471405bfee36895a5
5
+ SHA512:
6
+ metadata.gz: 6ab68db8d8fc0d0a978cc9f4a55d57886046936d5726b155a4f19a5fc991ba166039ad30743fb7d60ef84dea6fb45d8ae51cfdb2f52c4d4cf0544c1bce6efb78
7
+ data.tar.gz: 90a789f80a52adb9f247bb219050991c390d36c08508b8942ed7c59be9a46887380221f2137149fe92368f3380f2fea356b856d7c6a5e6aa4d5e32e7361af201
data/Gemfile.lock ADDED
@@ -0,0 +1,159 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fluent-plugin-google-cloud (0.6.3)
5
+ fluentd (~> 0.10)
6
+ google-api-client (~> 0.9.0)
7
+ google-cloud-logging (~> 0.23.2)
8
+ googleapis-common-protos (~> 1.3)
9
+ googleauth (~> 0.4)
10
+ grpc (~> 1.0, < 1.3)
11
+ json (~> 1.8)
12
+
13
+ GEM
14
+ remote: https://rubygems.org/
15
+ specs:
16
+ addressable (2.5.1)
17
+ public_suffix (~> 2.0, >= 2.0.2)
18
+ ast (2.3.0)
19
+ astrolabe (1.3.1)
20
+ parser (~> 2.2)
21
+ cool.io (1.5.0)
22
+ crack (0.4.3)
23
+ safe_yaml (~> 1.0.0)
24
+ faraday (0.12.1)
25
+ multipart-post (>= 1.2, < 3)
26
+ fluentd (0.14.18)
27
+ cool.io (>= 1.4.5, < 2.0.0)
28
+ http_parser.rb (>= 0.5.1, < 0.7.0)
29
+ msgpack (>= 0.7.0, < 2.0.0)
30
+ serverengine (>= 2.0.4, < 3.0.0)
31
+ sigdump (~> 0.2.2)
32
+ strptime (~> 0.1.7)
33
+ tzinfo (~> 1.0)
34
+ tzinfo-data (~> 1.0)
35
+ yajl-ruby (~> 1.0)
36
+ google-api-client (0.9.28)
37
+ addressable (~> 2.3)
38
+ googleauth (~> 0.5)
39
+ httpclient (~> 2.7)
40
+ hurley (~> 0.1)
41
+ memoist (~> 0.11)
42
+ mime-types (>= 1.6)
43
+ representable (~> 2.3.0)
44
+ retriable (~> 2.0)
45
+ google-cloud-core (0.21.1)
46
+ googleauth (~> 0.5.1)
47
+ google-cloud-logging (0.23.2)
48
+ google-cloud-core (~> 0.21.1)
49
+ google-gax (~> 0.6.0)
50
+ google-protobuf (~> 3.0)
51
+ googleapis-common-protos (~> 1.3)
52
+ grpc (~> 1.0)
53
+ orderedhash (= 0.0.6)
54
+ stackdriver-core (~> 0.21.0)
55
+ google-gax (0.6.0)
56
+ googleapis-common-protos (~> 1.3.1)
57
+ googleauth (~> 0.5.1)
58
+ grpc (~> 1.0)
59
+ rly (~> 0.2.3)
60
+ google-protobuf (3.3.0)
61
+ googleapis-common-protos (1.3.5)
62
+ google-protobuf (~> 3.2)
63
+ grpc (~> 1.0)
64
+ googleauth (0.5.1)
65
+ faraday (~> 0.9)
66
+ jwt (~> 1.4)
67
+ logging (~> 2.0)
68
+ memoist (~> 0.12)
69
+ multi_json (~> 1.11)
70
+ os (~> 0.9)
71
+ signet (~> 0.7)
72
+ grpc (1.2.5)
73
+ google-protobuf (~> 3.1)
74
+ googleauth (~> 0.5.1)
75
+ hashdiff (0.3.4)
76
+ http_parser.rb (0.6.0)
77
+ httpclient (2.8.3)
78
+ hurley (0.2)
79
+ json (1.8.6)
80
+ jwt (1.5.6)
81
+ little-plugger (1.1.4)
82
+ logging (2.2.2)
83
+ little-plugger (~> 1.1)
84
+ multi_json (~> 1.10)
85
+ memoist (0.16.0)
86
+ metaclass (0.0.4)
87
+ mime-types (3.1)
88
+ mime-types-data (~> 3.2015)
89
+ mime-types-data (3.2016.0521)
90
+ mocha (1.2.1)
91
+ metaclass (~> 0.0.1)
92
+ msgpack (1.1.0)
93
+ multi_json (1.12.1)
94
+ multipart-post (2.0.0)
95
+ orderedhash (0.0.6)
96
+ os (0.9.6)
97
+ parser (2.4.0.0)
98
+ ast (~> 2.2)
99
+ power_assert (1.0.2)
100
+ powerpack (0.1.1)
101
+ prometheus-client (0.7.1)
102
+ quantile (~> 0.2.0)
103
+ public_suffix (2.0.5)
104
+ quantile (0.2.0)
105
+ rainbow (2.2.2)
106
+ rake
107
+ rake (10.5.0)
108
+ representable (2.3.0)
109
+ uber (~> 0.0.7)
110
+ retriable (2.1.0)
111
+ rly (0.2.3)
112
+ rubocop (0.35.1)
113
+ astrolabe (~> 1.3)
114
+ parser (>= 2.2.3.0, < 3.0)
115
+ powerpack (~> 0.1)
116
+ rainbow (>= 1.99.1, < 3.0)
117
+ ruby-progressbar (~> 1.7)
118
+ tins (<= 1.6.0)
119
+ ruby-progressbar (1.8.1)
120
+ safe_yaml (1.0.4)
121
+ serverengine (2.0.5)
122
+ sigdump (~> 0.2.2)
123
+ sigdump (0.2.4)
124
+ signet (0.7.3)
125
+ addressable (~> 2.3)
126
+ faraday (~> 0.9)
127
+ jwt (~> 1.5)
128
+ multi_json (~> 1.10)
129
+ stackdriver-core (0.21.0)
130
+ strptime (0.1.9)
131
+ test-unit (3.2.5)
132
+ power_assert
133
+ thread_safe (0.3.6)
134
+ tins (1.6.0)
135
+ tzinfo (1.2.3)
136
+ thread_safe (~> 0.1)
137
+ tzinfo-data (1.2017.2)
138
+ tzinfo (>= 1.0.0)
139
+ uber (0.0.15)
140
+ webmock (1.24.6)
141
+ addressable (>= 2.3.6)
142
+ crack (>= 0.3.2)
143
+ hashdiff
144
+ yajl-ruby (1.3.0)
145
+
146
+ PLATFORMS
147
+ ruby
148
+
149
+ DEPENDENCIES
150
+ fluent-plugin-google-cloud!
151
+ mocha (~> 1.1)
152
+ prometheus-client (~> 0.7.1)
153
+ rake (~> 10.3)
154
+ rubocop (~> 0.35.0)
155
+ test-unit (~> 3.0)
156
+ webmock (~> 1.17)
157
+
158
+ BUNDLED WITH
159
+ 1.15.1
@@ -10,7 +10,7 @@ eos
10
10
  gem.homepage = \
11
11
  'https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud'
12
12
  gem.license = 'Apache-2.0'
13
- gem.version = '0.5.5'
13
+ gem.version = '0.6.4-alpha'
14
14
  gem.authors = ['Todd Derr', 'Alex Robinson']
15
15
  gem.email = ['salty@google.com']
16
16
  gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
@@ -19,16 +19,18 @@ eos
19
19
  gem.test_files = gem.files.grep(/^(test)/)
20
20
  gem.require_paths = ['lib']
21
21
 
22
- gem.add_runtime_dependency 'fluentd', '~> 0.12', '< 0.15.0'
23
- gem.add_runtime_dependency 'googleapis-common-protos', '~> 1.3', '< 1.4'
24
- gem.add_runtime_dependency 'google-api-client', '~> 0.9.0', '< 0.10.0'
25
- gem.add_runtime_dependency 'googleauth', '~> 0.4', '< 0.5'
26
- gem.add_runtime_dependency 'grpc', '~> 1.1.0', '< 1.2.0'
27
- gem.add_runtime_dependency 'json', '~> 1.8', '< 1.9'
22
+ gem.add_runtime_dependency 'fluentd', '~> 0.10'
23
+ gem.add_runtime_dependency 'googleapis-common-protos', '~> 1.3'
24
+ gem.add_runtime_dependency 'google-api-client', '~> 0.9.0'
25
+ gem.add_runtime_dependency 'google-cloud-logging', '~> 0.23.2'
26
+ gem.add_runtime_dependency 'googleauth', '~> 0.4'
27
+ gem.add_runtime_dependency 'grpc', '~> 1.0', '< 1.3'
28
+ gem.add_runtime_dependency 'json', '~> 1.8'
28
29
 
29
30
  gem.add_development_dependency 'mocha', '~> 1.1'
30
31
  gem.add_development_dependency 'rake', '~> 10.3'
31
32
  gem.add_development_dependency 'rubocop', '~> 0.35.0'
32
33
  gem.add_development_dependency 'webmock', '~> 1.17'
33
34
  gem.add_development_dependency 'test-unit', '~> 3.0'
35
+ gem.add_development_dependency 'prometheus-client', '~> 0.7.1'
34
36
  end
@@ -0,0 +1,67 @@
1
+ # Copyright 2017 Google Inc. All rights reserved.
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
+ # http://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
+ require 'grpc'
15
+ require 'json'
16
+ require 'open-uri'
17
+ require 'socket'
18
+ require 'time'
19
+ require 'yaml'
20
+ require 'google/apis'
21
+ require 'google/apis/logging_v2beta1'
22
+ require 'google/logging/v2/logging_pb'
23
+ require 'google/logging/v2/logging_services_pb'
24
+ require 'google/logging/v2/log_entry_pb'
25
+ require 'googleauth'
26
+
27
+ module Monitoring
28
+ # Base class for the monitoring registry.
29
+ class BaseMonitoringRegistry
30
+ def counter(_name, _desc)
31
+ _undefined
32
+ end
33
+ end
34
+
35
+ # Prometheus implementation of the monitoring registry, that uses the default
36
+ # registry in the official Prometheus client library.
37
+ class PrometheusMonitoringRegistry < BaseMonitoringRegistry
38
+ def self.name
39
+ 'prometheus'
40
+ end
41
+
42
+ def initialize
43
+ require 'prometheus/client'
44
+ @registry = Prometheus::Client.registry
45
+ end
46
+
47
+ # Exception-driven behavior to avoid synchronization errors.
48
+ def counter(name, desc)
49
+ return @registry.counter(name, desc)
50
+ rescue Prometheus::Client::Registry::AlreadyRegisteredError
51
+ return @registry.get(name)
52
+ end
53
+ end
54
+
55
+ # Factory that is used to create a monitoring registry based on
56
+ # the monitoring solution name.
57
+ class MonitoringRegistryFactory
58
+ @known_registry_types = {
59
+ PrometheusMonitoringRegistry.name =>
60
+ PrometheusMonitoringRegistry
61
+ }
62
+
63
+ def self.create(name)
64
+ (@known_registry_types[name] || BaseMonitoringRegistry).new
65
+ end
66
+ end
67
+ end