fluent-plugin-google-cloud 0.7.16 → 0.7.17

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: cfb019175c35271448646b370774c129b48096dac9a1dfb5a1904776ba0af63c
4
- data.tar.gz: 07ffca87bc262f3a29b964b47ccefd69551ad3b11384b54295f1270d101d4633
3
+ metadata.gz: 8d28a173bd9fed91a5ee6f9998b80a3589c54cf56c12a2d6319e744a33b4f257
4
+ data.tar.gz: 298355f4eb05726dcd9f3c2f9c6a9e472df7da887b67ced2dead21063f3681af
5
5
  SHA512:
6
- metadata.gz: f4f2584f87ab91bd87d75b7139555928e3d5daaa073170258a7125468a5a2b24bcce968b2f3120f13f8f6ef5328029c2a5ac6171fab0e0b2b8654eb3436f6941
7
- data.tar.gz: 7d917d3ecbd2d946e8c712a2c686a5322465b3154fc2c5b889f87fa299b53dd17a5396509315d8cb89a40b55c8960dffe41995c342df01baa50cc3c1a287bc7d
6
+ metadata.gz: 798e94141cfc4e57b3a844df4a63248e4a3a1f480ddaf55c6c18ff56d958cf6edfe20c29c0e6be5bc2c9367a77be416a370b45b3a8ab6e5c5fc76489bbe31210
7
+ data.tar.gz: dcf5f083b696264e62642819ced27f28fc91e698bcb4fd827d65fd6c0b9652f1efee5c50b33f8a124f0a95c12e00cf1b5807572604da5d8882411f2c3d03683e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-google-cloud (0.7.16)
4
+ fluent-plugin-google-cloud (0.7.17)
5
5
  fluentd (= 1.6.3)
6
6
  google-api-client (= 0.30.8)
7
7
  google-cloud-logging (= 1.6.6)
@@ -45,9 +45,9 @@ GEM
45
45
  representable (~> 3.0)
46
46
  retriable (>= 2.0, < 4.0)
47
47
  signet (~> 0.10)
48
- google-cloud-core (1.3.0)
48
+ google-cloud-core (1.3.1)
49
49
  google-cloud-env (~> 1.0)
50
- google-cloud-env (1.2.0)
50
+ google-cloud-env (1.2.1)
51
51
  faraday (~> 0.11)
52
52
  google-cloud-logging (1.6.6)
53
53
  concurrent-ruby (~> 1.1)
@@ -125,7 +125,7 @@ GEM
125
125
  faraday (~> 0.9)
126
126
  jwt (>= 1.5, < 3.0)
127
127
  multi_json (~> 1.10)
128
- stackdriver-core (1.3.3)
128
+ stackdriver-core (1.3.4)
129
129
  google-cloud-core (~> 1.2)
130
130
  strptime (0.2.3)
131
131
  test-unit (3.3.3)
@@ -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.7.16'
13
+ gem.version = '0.7.17'
14
14
  gem.authors = ['Stackdriver Agents Team']
15
15
  gem.email = ['stackdriver-agents@google.com']
16
16
  gem.required_ruby_version = Gem::Requirement.new('>= 2.2')
@@ -0,0 +1,62 @@
1
+ # Copyright 2019 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 'fluent/plugin/input'
15
+ require 'objspace'
16
+
17
+ module Fluent
18
+ # Dump out all live objects to json files. Each file is a snapshot of the Ruby
19
+ # heap at that time. See http://tmm1.net/ruby21-objspace/ for more details.
20
+ class ObjectSpaceDumpInput < Fluent::Plugin::Input
21
+ Fluent::Plugin.register_input('object_space_dump', self)
22
+
23
+ helpers :timer
24
+
25
+ def initialize
26
+ super
27
+
28
+ ObjectSpace.trace_object_allocations_start
29
+ end
30
+
31
+ # Make sure you have enough disk space, because these files are large
32
+ # (roughly 50MB).
33
+ config_param :emit_interval, :time, default: 3600
34
+
35
+ def multi_workers_ready?
36
+ true
37
+ end
38
+
39
+ def start
40
+ super
41
+
42
+ # Dump during startup. The timer only fires after @emit_interval.
43
+ on_timer
44
+ timer_execute(:object_space_dump_input, @emit_interval,
45
+ &method(:on_timer))
46
+ end
47
+
48
+ def on_timer
49
+ GC.start
50
+ # Use Tempfile.create to open the file, in order to preserve the file.
51
+ file = Tempfile.create(['heap-' + fluentd_worker_id.to_s + '-', '.json'])
52
+ begin
53
+ log.info 'dumping object space to',
54
+ filepath: file.path,
55
+ worker: fluentd_worker_id
56
+ ObjectSpace.dump_all(output: file)
57
+ ensure
58
+ file.close
59
+ end
60
+ end
61
+ end
62
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-google-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.16
4
+ version: 0.7.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stackdriver Agents Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-16 00:00:00.000000000 Z
11
+ date: 2019-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -225,6 +225,7 @@ files:
225
225
  - Rakefile
226
226
  - fluent-plugin-google-cloud.gemspec
227
227
  - lib/fluent/plugin/filter_add_insert_ids.rb
228
+ - lib/fluent/plugin/in_object_space_dump.rb
228
229
  - lib/fluent/plugin/monitoring.rb
229
230
  - lib/fluent/plugin/out_google_cloud.rb
230
231
  - lib/fluent/plugin/statusz.rb