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 +7 -0
- data/Gemfile.lock +159 -0
- data/fluent-plugin-google-cloud.gemspec +9 -7
- data/lib/fluent/plugin/monitoring.rb +67 -0
- data/lib/fluent/plugin/out_google_cloud.rb +481 -224
- data/test/plugin/base_test.rb +263 -447
- data/test/plugin/constants.rb +452 -0
- data/test/plugin/test_out_google_cloud.rb +62 -46
- data/test/plugin/test_out_google_cloud_grpc.rb +66 -61
- metadata +83 -109
- data/lib/google/logging/type/http_request_pb.rb +0 -30
- data/lib/google/logging/type/log_severity_pb.rb +0 -26
- data/lib/google/logging/v1/log_entry_pb.rb +0 -52
- data/lib/google/logging/v1/logging_pb.rb +0 -84
- data/lib/google/logging/v1/logging_services_pb.rb +0 -150
@@ -31,7 +31,7 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
31
31
|
{ 8 => 'ResourceExhausted',
|
32
32
|
12 => 'Unimplemented',
|
33
33
|
16 => 'Unauthenticated' }.each_with_index do |(code, message), index|
|
34
|
-
setup_logging_stubs(
|
34
|
+
setup_logging_stubs(true, code, message) do
|
35
35
|
d = create_driver(USE_GRPC_CONFIG, 'test',
|
36
36
|
GRPCLoggingMockFailingService.rpc_stub_class)
|
37
37
|
# The API Client should not retry this and the plugin should consume the
|
@@ -51,7 +51,7 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
51
51
|
13 => 'Internal',
|
52
52
|
14 => 'Unavailable' }.each_with_index do |(code, message), index|
|
53
53
|
exception_count = 0
|
54
|
-
setup_logging_stubs(
|
54
|
+
setup_logging_stubs(true, code, message) do
|
55
55
|
d = create_driver(USE_GRPC_CONFIG, 'test',
|
56
56
|
GRPCLoggingMockFailingService.rpc_stub_class)
|
57
57
|
# The API client should retry this once, then throw an exception which
|
@@ -72,31 +72,50 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
|
75
|
+
# TODO: The code in the non-gRPC and gRPC tests is nearly identical.
|
76
|
+
# Refactor and remove duplication.
|
77
|
+
# TODO: Use status codes instead of int literals.
|
78
|
+
def test_prometheus_metrics
|
76
79
|
setup_gce_metadata_stubs
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
80
|
+
[
|
81
|
+
# Single successful request.
|
82
|
+
[false, 0, 1, 1, [1, 0, 1, 0]],
|
83
|
+
# Several successful requests.
|
84
|
+
[false, 0, 2, 1, [2, 0, 2, 0]],
|
85
|
+
# Single successful request with several entries.
|
86
|
+
[false, 0, 1, 2, [1, 0, 2, 0]],
|
87
|
+
# Single failed request that causes logs to be dropped.
|
88
|
+
[true, 16, 1, 1, [0, 1, 0, 1]],
|
89
|
+
# Single failed request that escalates without logs being dropped.
|
90
|
+
[true, 13, 1, 1, [0, 1, 0, 0]]
|
91
|
+
].each do |should_fail, code, request_count, entry_count, metric_values|
|
92
|
+
setup_prometheus
|
93
|
+
setup_logging_stubs(should_fail, code, 'SomeMessage') do
|
94
|
+
(1..request_count).each do
|
95
|
+
d = create_driver(USE_GRPC_CONFIG + PROMETHEUS_ENABLE_CONFIG, 'test',
|
96
|
+
GRPCLoggingMockFailingService.rpc_stub_class)
|
97
|
+
(1..entry_count).each do |i|
|
98
|
+
d.emit('message' => log_entry(i.to_s))
|
99
|
+
end
|
100
|
+
# rubocop:disable Lint/HandleExceptions
|
101
|
+
begin
|
102
|
+
d.run
|
103
|
+
rescue GRPC::BadStatus
|
104
|
+
end
|
105
|
+
# rubocop:enable Lint/HandleExceptions
|
106
|
+
end
|
107
|
+
end
|
108
|
+
successful_requests_count, failed_requests_count,
|
109
|
+
ingested_entries_count, dropped_entries_count = metric_values
|
110
|
+
assert_prometheus_metric_value(:stackdriver_successful_requests_count,
|
111
|
+
successful_requests_count, grpc: true)
|
112
|
+
assert_prometheus_metric_value(:stackdriver_failed_requests_count,
|
113
|
+
failed_requests_count,
|
114
|
+
grpc: true, code: code)
|
115
|
+
assert_prometheus_metric_value(:stackdriver_ingested_entries_count,
|
116
|
+
ingested_entries_count)
|
117
|
+
assert_prometheus_metric_value(:stackdriver_dropped_entries_count,
|
118
|
+
dropped_entries_count)
|
100
119
|
end
|
101
120
|
end
|
102
121
|
|
@@ -124,7 +143,7 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
124
143
|
end
|
125
144
|
verify_index = 0
|
126
145
|
verify_log_entries(emit_index, COMPUTE_PARAMS) do |entry|
|
127
|
-
assert_equal_with_default(entry['
|
146
|
+
assert_equal_with_default(entry['severity'],
|
128
147
|
expected_severity[verify_index],
|
129
148
|
'DEFAULT', entry)
|
130
149
|
verify_index += 1
|
@@ -143,8 +162,8 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
143
162
|
'null_field' => nil)
|
144
163
|
d.run
|
145
164
|
end
|
146
|
-
verify_log_entries(1, COMPUTE_PARAMS, '
|
147
|
-
fields = get_fields(entry['
|
165
|
+
verify_log_entries(1, COMPUTE_PARAMS, 'jsonPayload') do |entry|
|
166
|
+
fields = get_fields(entry['jsonPayload'])
|
148
167
|
assert_equal 5, fields.size, entry
|
149
168
|
assert_equal 'test log entry 0', get_string(fields['msg']), entry
|
150
169
|
assert_equal 'test non utf8', get_string(fields['normal_key']), entry
|
@@ -174,9 +193,8 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
174
193
|
d.run
|
175
194
|
end
|
176
195
|
verify_log_entries(1, COMPUTE_PARAMS) do |entry|
|
177
|
-
assert_equal expected, entry['
|
178
|
-
"
|
179
|
-
"entry: '#{entry}'."
|
196
|
+
assert_equal expected, entry['timestamp'], 'Test with timestamp ' \
|
197
|
+
"'#{input}' failed for entry: '#{entry}'."
|
180
198
|
end
|
181
199
|
end
|
182
200
|
end
|
@@ -185,8 +203,8 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
185
203
|
|
186
204
|
GRPC_MOCK_HOST = 'localhost:56789'
|
187
205
|
|
188
|
-
WriteLogEntriesRequest = Google::Logging::
|
189
|
-
WriteLogEntriesResponse = Google::Logging::
|
206
|
+
WriteLogEntriesRequest = Google::Logging::V2::WriteLogEntriesRequest
|
207
|
+
WriteLogEntriesResponse = Google::Logging::V2::WriteLogEntriesResponse
|
190
208
|
|
191
209
|
USE_GRPC_CONFIG = %(
|
192
210
|
use_grpc true
|
@@ -223,18 +241,13 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
223
241
|
end
|
224
242
|
|
225
243
|
# GRPC logging mock that successfully logs the records.
|
226
|
-
class GRPCLoggingMockService < Google::Logging::
|
227
|
-
def initialize(
|
244
|
+
class GRPCLoggingMockService < Google::Logging::V2::LoggingServiceV2::Service
|
245
|
+
def initialize(requests_received)
|
228
246
|
super()
|
229
247
|
@requests_received = requests_received
|
230
|
-
@expected_log_names = stub_params.map do |param|
|
231
|
-
"projects/#{param[:project_id]}/logs/#{param[:log_name]}"
|
232
|
-
end
|
233
248
|
end
|
234
249
|
|
235
250
|
def write_log_entries(request, _call)
|
236
|
-
fail GRPC::BadStatus.new(99, "Unexpected request: #{request.inspect}") \
|
237
|
-
unless @expected_log_names.include?(request.log_name)
|
238
251
|
@requests_received << request
|
239
252
|
WriteLogEntriesResponse.new
|
240
253
|
end
|
@@ -248,15 +261,17 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
248
261
|
end
|
249
262
|
|
250
263
|
alias_method :list_logs, :_undefined
|
264
|
+
alias_method :list_log_entries, :_undefined
|
251
265
|
alias_method :list_log_services, :_undefined
|
252
266
|
alias_method :list_log_service_indexes, :_undefined
|
267
|
+
alias_method :list_monitored_resource_descriptors, :_undefined
|
253
268
|
alias_method :delete_log, :_undefined
|
254
269
|
undef_method :_undefined
|
255
270
|
end
|
256
271
|
|
257
272
|
# GRPC logging mock that fails and returns server side or client side errors.
|
258
273
|
class GRPCLoggingMockFailingService <
|
259
|
-
Google::Logging::
|
274
|
+
Google::Logging::V2::LoggingServiceV2::Service
|
260
275
|
# 'code_sent' and 'message_sent' are references of external variables. We
|
261
276
|
# will assert the values of them later. 'code_value' and 'message_value'
|
262
277
|
# are actual error code and message we expect this mock to return.
|
@@ -281,26 +296,23 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
281
296
|
end
|
282
297
|
|
283
298
|
alias_method :list_logs, :_undefined
|
299
|
+
alias_method :list_log_entries, :_undefined
|
284
300
|
alias_method :list_log_services, :_undefined
|
285
301
|
alias_method :list_log_service_indexes, :_undefined
|
302
|
+
alias_method :list_monitored_resource_descriptors, :_undefined
|
286
303
|
alias_method :delete_log, :_undefined
|
287
304
|
undef_method :_undefined
|
288
305
|
end
|
289
306
|
|
290
307
|
# Set up grpc stubs to mock the external calls.
|
291
|
-
def setup_logging_stubs(
|
292
|
-
code = 0, message = 'Ok')
|
293
|
-
stub_params = override_stub_params || \
|
294
|
-
[COMPUTE_PARAMS, VMENGINE_PARAMS, CONTAINER_FROM_TAG_PARAMS,
|
295
|
-
CONTAINER_FROM_METADATA_PARAMS, CLOUDFUNCTIONS_PARAMS,
|
296
|
-
CUSTOM_PARAMS, EC2_PARAMS]
|
308
|
+
def setup_logging_stubs(should_fail = false, code = 0, message = 'Ok')
|
297
309
|
srv = GRPC::RpcServer.new
|
298
310
|
@failed_attempts = []
|
299
311
|
@requests_sent = []
|
300
312
|
if should_fail
|
301
313
|
grpc = GRPCLoggingMockFailingService.new(code, message, @failed_attempts)
|
302
314
|
else
|
303
|
-
grpc = GRPCLoggingMockService.new(
|
315
|
+
grpc = GRPCLoggingMockService.new(@requests_sent)
|
304
316
|
end
|
305
317
|
srv.handle(grpc)
|
306
318
|
srv.add_http2_port(GRPC_MOCK_HOST, :this_port_is_insecure)
|
@@ -320,8 +332,8 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
320
332
|
# Verify the number and the content of the log entries match the expectation.
|
321
333
|
# The caller can optionally provide a block which is called for each entry.
|
322
334
|
def verify_log_entries(n, params, payload_type = 'textPayload', &block)
|
323
|
-
@requests_sent.each do |
|
324
|
-
@logs_sent << JSON.parse(
|
335
|
+
@requests_sent.each do |request|
|
336
|
+
@logs_sent << JSON.parse(request.to_json)
|
325
337
|
end
|
326
338
|
verify_json_log_entries(n, params, payload_type, &block)
|
327
339
|
end
|
@@ -347,16 +359,9 @@ class GoogleCloudOutputGRPCTest < Test::Unit::TestCase
|
|
347
359
|
end
|
348
360
|
end
|
349
361
|
|
350
|
-
#
|
351
|
-
def
|
352
|
-
|
353
|
-
k == 'referer'
|
354
|
-
end
|
355
|
-
end
|
356
|
-
|
357
|
-
# Get the fields of the struct payload.
|
358
|
-
def get_fields(struct_payload)
|
359
|
-
struct_payload['fields']
|
362
|
+
# Get the fields of the payload.
|
363
|
+
def get_fields(payload)
|
364
|
+
payload['fields']
|
360
365
|
end
|
361
366
|
|
362
367
|
# Get the value of a struct field.
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmik-fluent-plugin-google-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.6.4.pre.alpha
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Todd Derr
|
@@ -10,281 +9,256 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2017-
|
12
|
+
date: 2017-07-11 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: fluentd
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- - ~>
|
18
|
+
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version: '0.
|
23
|
-
- - <
|
24
|
-
- !ruby/object:Gem::Version
|
25
|
-
version: 0.15.0
|
20
|
+
version: '0.10'
|
26
21
|
type: :runtime
|
27
22
|
prerelease: false
|
28
23
|
version_requirements: !ruby/object:Gem::Requirement
|
29
|
-
none: false
|
30
24
|
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0.12'
|
34
|
-
- - <
|
25
|
+
- - "~>"
|
35
26
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
27
|
+
version: '0.10'
|
37
28
|
- !ruby/object:Gem::Dependency
|
38
29
|
name: googleapis-common-protos
|
39
30
|
requirement: !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
31
|
requirements:
|
42
|
-
- - ~>
|
32
|
+
- - "~>"
|
43
33
|
- !ruby/object:Gem::Version
|
44
34
|
version: '1.3'
|
45
|
-
- - <
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.4'
|
48
35
|
type: :runtime
|
49
36
|
prerelease: false
|
50
37
|
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
38
|
requirements:
|
53
|
-
- - ~>
|
39
|
+
- - "~>"
|
54
40
|
- !ruby/object:Gem::Version
|
55
41
|
version: '1.3'
|
56
|
-
- - <
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version: '1.4'
|
59
42
|
- !ruby/object:Gem::Dependency
|
60
43
|
name: google-api-client
|
61
44
|
requirement: !ruby/object:Gem::Requirement
|
62
|
-
none: false
|
63
45
|
requirements:
|
64
|
-
- - ~>
|
46
|
+
- - "~>"
|
65
47
|
- !ruby/object:Gem::Version
|
66
48
|
version: 0.9.0
|
67
|
-
- - <
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 0.10.0
|
70
49
|
type: :runtime
|
71
50
|
prerelease: false
|
72
51
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
52
|
requirements:
|
75
|
-
- - ~>
|
53
|
+
- - "~>"
|
76
54
|
- !ruby/object:Gem::Version
|
77
55
|
version: 0.9.0
|
78
|
-
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: google-cloud-logging
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
79
61
|
- !ruby/object:Gem::Version
|
80
|
-
version: 0.
|
62
|
+
version: 0.23.2
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.23.2
|
81
70
|
- !ruby/object:Gem::Dependency
|
82
71
|
name: googleauth
|
83
72
|
requirement: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
73
|
requirements:
|
86
|
-
- - ~>
|
74
|
+
- - "~>"
|
87
75
|
- !ruby/object:Gem::Version
|
88
76
|
version: '0.4'
|
89
|
-
- - <
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '0.5'
|
92
77
|
type: :runtime
|
93
78
|
prerelease: false
|
94
79
|
version_requirements: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
80
|
requirements:
|
97
|
-
- - ~>
|
81
|
+
- - "~>"
|
98
82
|
- !ruby/object:Gem::Version
|
99
83
|
version: '0.4'
|
100
|
-
- - <
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0.5'
|
103
84
|
- !ruby/object:Gem::Dependency
|
104
85
|
name: grpc
|
105
86
|
requirement: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
87
|
requirements:
|
108
|
-
- - ~>
|
88
|
+
- - "~>"
|
109
89
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
111
|
-
- - <
|
90
|
+
version: '1.0'
|
91
|
+
- - "<"
|
112
92
|
- !ruby/object:Gem::Version
|
113
|
-
version: 1.
|
93
|
+
version: '1.3'
|
114
94
|
type: :runtime
|
115
95
|
prerelease: false
|
116
96
|
version_requirements: !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
97
|
requirements:
|
119
|
-
- - ~>
|
98
|
+
- - "~>"
|
120
99
|
- !ruby/object:Gem::Version
|
121
|
-
version: 1.
|
122
|
-
- - <
|
100
|
+
version: '1.0'
|
101
|
+
- - "<"
|
123
102
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
103
|
+
version: '1.3'
|
125
104
|
- !ruby/object:Gem::Dependency
|
126
105
|
name: json
|
127
106
|
requirement: !ruby/object:Gem::Requirement
|
128
|
-
none: false
|
129
107
|
requirements:
|
130
|
-
- - ~>
|
108
|
+
- - "~>"
|
131
109
|
- !ruby/object:Gem::Version
|
132
110
|
version: '1.8'
|
133
|
-
- - <
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: '1.9'
|
136
111
|
type: :runtime
|
137
112
|
prerelease: false
|
138
113
|
version_requirements: !ruby/object:Gem::Requirement
|
139
|
-
none: false
|
140
114
|
requirements:
|
141
|
-
- - ~>
|
115
|
+
- - "~>"
|
142
116
|
- !ruby/object:Gem::Version
|
143
117
|
version: '1.8'
|
144
|
-
- - <
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
version: '1.9'
|
147
118
|
- !ruby/object:Gem::Dependency
|
148
119
|
name: mocha
|
149
120
|
requirement: !ruby/object:Gem::Requirement
|
150
|
-
none: false
|
151
121
|
requirements:
|
152
|
-
- - ~>
|
122
|
+
- - "~>"
|
153
123
|
- !ruby/object:Gem::Version
|
154
124
|
version: '1.1'
|
155
125
|
type: :development
|
156
126
|
prerelease: false
|
157
127
|
version_requirements: !ruby/object:Gem::Requirement
|
158
|
-
none: false
|
159
128
|
requirements:
|
160
|
-
- - ~>
|
129
|
+
- - "~>"
|
161
130
|
- !ruby/object:Gem::Version
|
162
131
|
version: '1.1'
|
163
132
|
- !ruby/object:Gem::Dependency
|
164
133
|
name: rake
|
165
134
|
requirement: !ruby/object:Gem::Requirement
|
166
|
-
none: false
|
167
135
|
requirements:
|
168
|
-
- - ~>
|
136
|
+
- - "~>"
|
169
137
|
- !ruby/object:Gem::Version
|
170
138
|
version: '10.3'
|
171
139
|
type: :development
|
172
140
|
prerelease: false
|
173
141
|
version_requirements: !ruby/object:Gem::Requirement
|
174
|
-
none: false
|
175
142
|
requirements:
|
176
|
-
- - ~>
|
143
|
+
- - "~>"
|
177
144
|
- !ruby/object:Gem::Version
|
178
145
|
version: '10.3'
|
179
146
|
- !ruby/object:Gem::Dependency
|
180
147
|
name: rubocop
|
181
148
|
requirement: !ruby/object:Gem::Requirement
|
182
|
-
none: false
|
183
149
|
requirements:
|
184
|
-
- - ~>
|
150
|
+
- - "~>"
|
185
151
|
- !ruby/object:Gem::Version
|
186
152
|
version: 0.35.0
|
187
153
|
type: :development
|
188
154
|
prerelease: false
|
189
155
|
version_requirements: !ruby/object:Gem::Requirement
|
190
|
-
none: false
|
191
156
|
requirements:
|
192
|
-
- - ~>
|
157
|
+
- - "~>"
|
193
158
|
- !ruby/object:Gem::Version
|
194
159
|
version: 0.35.0
|
195
160
|
- !ruby/object:Gem::Dependency
|
196
161
|
name: webmock
|
197
162
|
requirement: !ruby/object:Gem::Requirement
|
198
|
-
none: false
|
199
163
|
requirements:
|
200
|
-
- - ~>
|
164
|
+
- - "~>"
|
201
165
|
- !ruby/object:Gem::Version
|
202
166
|
version: '1.17'
|
203
167
|
type: :development
|
204
168
|
prerelease: false
|
205
169
|
version_requirements: !ruby/object:Gem::Requirement
|
206
|
-
none: false
|
207
170
|
requirements:
|
208
|
-
- - ~>
|
171
|
+
- - "~>"
|
209
172
|
- !ruby/object:Gem::Version
|
210
173
|
version: '1.17'
|
211
174
|
- !ruby/object:Gem::Dependency
|
212
175
|
name: test-unit
|
213
176
|
requirement: !ruby/object:Gem::Requirement
|
214
|
-
none: false
|
215
177
|
requirements:
|
216
|
-
- - ~>
|
178
|
+
- - "~>"
|
217
179
|
- !ruby/object:Gem::Version
|
218
180
|
version: '3.0'
|
219
181
|
type: :development
|
220
182
|
prerelease: false
|
221
183
|
version_requirements: !ruby/object:Gem::Requirement
|
222
|
-
none: false
|
223
184
|
requirements:
|
224
|
-
- - ~>
|
185
|
+
- - "~>"
|
225
186
|
- !ruby/object:Gem::Version
|
226
187
|
version: '3.0'
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
188
|
+
- !ruby/object:Gem::Dependency
|
189
|
+
name: prometheus-client
|
190
|
+
requirement: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 0.7.1
|
195
|
+
type: :development
|
196
|
+
prerelease: false
|
197
|
+
version_requirements: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 0.7.1
|
202
|
+
description: |2
|
203
|
+
Fluentd output plugin for the Stackdriver Logging API, which will make
|
204
|
+
logs viewable in the Developer Console's log viewer and can optionally
|
205
|
+
store them in Google Cloud Storage and/or BigQuery.
|
206
|
+
This is an official Google Ruby gem.
|
231
207
|
email:
|
232
208
|
- salty@google.com
|
233
209
|
executables: []
|
234
210
|
extensions: []
|
235
211
|
extra_rdoc_files: []
|
236
212
|
files:
|
237
|
-
-
|
238
|
-
- README.rdoc
|
213
|
+
- CONTRIBUTING
|
239
214
|
- Gemfile
|
215
|
+
- Gemfile.lock
|
240
216
|
- LICENSE
|
241
|
-
-
|
217
|
+
- README.rdoc
|
218
|
+
- Rakefile
|
219
|
+
- fluent-plugin-google-cloud.gemspec
|
220
|
+
- lib/fluent/plugin/monitoring.rb
|
221
|
+
- lib/fluent/plugin/out_google_cloud.rb
|
242
222
|
- test/helper.rb
|
243
223
|
- test/plugin/base_test.rb
|
244
|
-
- test/plugin/
|
245
|
-
- test/plugin/data/credentials.json
|
224
|
+
- test/plugin/constants.rb
|
246
225
|
- test/plugin/data/c31e573fd7f62ed495c9ca3821a5a85cb036dee1-privatekey.p12
|
226
|
+
- test/plugin/data/credentials.json
|
227
|
+
- test/plugin/data/iam-credentials.json
|
247
228
|
- test/plugin/data/invalid_credentials.json
|
248
229
|
- test/plugin/test_out_google_cloud.rb
|
249
230
|
- test/plugin/test_out_google_cloud_grpc.rb
|
250
|
-
- Rakefile
|
251
|
-
- lib/fluent/plugin/out_google_cloud.rb
|
252
|
-
- lib/google/logging/v1/log_entry_pb.rb
|
253
|
-
- lib/google/logging/v1/logging_pb.rb
|
254
|
-
- lib/google/logging/v1/logging_services_pb.rb
|
255
|
-
- lib/google/logging/type/http_request_pb.rb
|
256
|
-
- lib/google/logging/type/log_severity_pb.rb
|
257
231
|
homepage: https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud
|
258
232
|
licenses:
|
259
233
|
- Apache-2.0
|
234
|
+
metadata: {}
|
260
235
|
post_install_message:
|
261
236
|
rdoc_options: []
|
262
237
|
require_paths:
|
263
238
|
- lib
|
264
239
|
required_ruby_version: !ruby/object:Gem::Requirement
|
265
|
-
none: false
|
266
240
|
requirements:
|
267
|
-
- -
|
241
|
+
- - ">="
|
268
242
|
- !ruby/object:Gem::Version
|
269
243
|
version: '2.0'
|
270
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
|
-
none: false
|
272
245
|
requirements:
|
273
|
-
- -
|
246
|
+
- - ">"
|
274
247
|
- !ruby/object:Gem::Version
|
275
|
-
version:
|
248
|
+
version: 1.3.1
|
276
249
|
requirements: []
|
277
250
|
rubyforge_project:
|
278
|
-
rubygems_version:
|
251
|
+
rubygems_version: 2.6.12
|
279
252
|
signing_key:
|
280
|
-
specification_version:
|
253
|
+
specification_version: 4
|
281
254
|
summary: fluentd output plugin for the Stackdriver Logging API
|
282
255
|
test_files:
|
283
256
|
- test/helper.rb
|
284
257
|
- test/plugin/base_test.rb
|
285
|
-
- test/plugin/
|
286
|
-
- test/plugin/data/credentials.json
|
258
|
+
- test/plugin/constants.rb
|
287
259
|
- test/plugin/data/c31e573fd7f62ed495c9ca3821a5a85cb036dee1-privatekey.p12
|
260
|
+
- test/plugin/data/credentials.json
|
261
|
+
- test/plugin/data/iam-credentials.json
|
288
262
|
- test/plugin/data/invalid_credentials.json
|
289
263
|
- test/plugin/test_out_google_cloud.rb
|
290
264
|
- test/plugin/test_out_google_cloud_grpc.rb
|
@@ -1,30 +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
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message "google.logging.type.HttpRequest" do
|
8
|
-
optional :request_method, :string, 1
|
9
|
-
optional :request_url, :string, 2
|
10
|
-
optional :request_size, :int64, 3
|
11
|
-
optional :status, :int32, 4
|
12
|
-
optional :response_size, :int64, 5
|
13
|
-
optional :user_agent, :string, 6
|
14
|
-
optional :remote_ip, :string, 7
|
15
|
-
optional :server_ip, :string, 13
|
16
|
-
optional :referer, :string, 8
|
17
|
-
optional :cache_lookup, :bool, 11
|
18
|
-
optional :cache_hit, :bool, 9
|
19
|
-
optional :cache_validated_with_origin_server, :bool, 10
|
20
|
-
optional :cache_fill_bytes, :int64, 12
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
module Google
|
25
|
-
module Logging
|
26
|
-
module Type
|
27
|
-
HttpRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.type.HttpRequest").msgclass
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,26 +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
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_enum "google.logging.type.LogSeverity" do
|
8
|
-
value :DEFAULT, 0
|
9
|
-
value :DEBUG, 100
|
10
|
-
value :INFO, 200
|
11
|
-
value :NOTICE, 300
|
12
|
-
value :WARNING, 400
|
13
|
-
value :ERROR, 500
|
14
|
-
value :CRITICAL, 600
|
15
|
-
value :ALERT, 700
|
16
|
-
value :EMERGENCY, 800
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
module Google
|
21
|
-
module Logging
|
22
|
-
module Type
|
23
|
-
LogSeverity = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.type.LogSeverity").enummodule
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|