fluent-plugin-google-cloud 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = 'fluent-plugin-google-cloud'
|
3
|
-
gem.description = %q{Fluentd plugin to stream logs to the Google Cloud Platform's
|
4
|
-
gem.summary = %q{Fluentd plugin to stream logs to the Google Cloud Platform's
|
3
|
+
gem.description = %q{Fluentd plugin to stream logs to the Google Cloud Platform's logging API, which will make them viewable in the Developer Console's log viewer and can optionally store them in Google Cloud Storage and/or BigQuery. This is an official Google Ruby gem.}
|
4
|
+
gem.summary = %q{Fluentd plugin to stream logs to the Google Cloud Platform's logging API}
|
5
5
|
gem.homepage = 'https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud'
|
6
6
|
gem.license = 'Apache 2.0'
|
7
|
-
gem.version = '0.1.
|
7
|
+
gem.version = '0.1.2'
|
8
8
|
gem.authors = ['Todd Derr', 'Alex Robinson']
|
9
9
|
gem.email = ['salty@google.com']
|
10
10
|
|
@@ -19,6 +19,7 @@ module Fluent
|
|
19
19
|
# Constants for Google service names.
|
20
20
|
APPENGINE_SERVICE = 'appengine.googleapis.com'
|
21
21
|
COMPUTE_SERVICE = 'compute.googleapis.com'
|
22
|
+
DATAFLOW_SERVICE = 'dataflow.googleapis.com'
|
22
23
|
|
23
24
|
# Legal values:
|
24
25
|
# 'compute_engine_service_account' - Use the service account automatically
|
@@ -92,10 +93,6 @@ module Fluent
|
|
92
93
|
@vm_id = fetch_metadata('instance/id')
|
93
94
|
# TODO: Send instance tags and/or hostname with the logs as well?
|
94
95
|
@common_labels = []
|
95
|
-
add_label(common_labels, "#{COMPUTE_SERVICE}/resource_type",
|
96
|
-
'strValue', 'instance')
|
97
|
-
add_label(common_labels, "#{COMPUTE_SERVICE}/resource_id",
|
98
|
-
'strValue', @vm_id)
|
99
96
|
|
100
97
|
# If this is running on a Managed VM, grab the relevant App Engine
|
101
98
|
# metadata as well.
|
@@ -114,10 +111,23 @@ module Fluent
|
|
114
111
|
'strValue', @gae_backend_name)
|
115
112
|
add_label(common_labels, "#{APPENGINE_SERVICE}/version_id",
|
116
113
|
'strValue', @gae_backend_version)
|
114
|
+
elsif (attributes.include?('job_id'))
|
115
|
+
@running_on_managed_vm = false
|
116
|
+
@service_name = DATAFLOW_SERVICE
|
117
|
+
@dataflow_job_id = fetch_metadata('instance/attributes/job_id')
|
118
|
+
add_label(common_labels, "#{DATAFLOW_SERVICE}/job_id",
|
119
|
+
'strValue', @dataflow_job_id)
|
117
120
|
else
|
118
121
|
@running_on_managed_vm = false
|
119
122
|
@service_name = COMPUTE_SERVICE
|
120
123
|
end
|
124
|
+
|
125
|
+
if (@service_name != DATAFLOW_SERVICE)
|
126
|
+
add_label(common_labels, "#{COMPUTE_SERVICE}/resource_type",
|
127
|
+
'strValue', 'instance')
|
128
|
+
add_label(common_labels, "#{COMPUTE_SERVICE}/resource_id",
|
129
|
+
'strValue', @vm_id)
|
130
|
+
end
|
121
131
|
end
|
122
132
|
|
123
133
|
def shutdown
|
@@ -217,7 +227,7 @@ module Fluent
|
|
217
227
|
def init_api_client
|
218
228
|
@client = Google::APIClient.new(
|
219
229
|
:application_name => 'Fluentd Google Cloud Logging plugin',
|
220
|
-
:application_version => '0.1.
|
230
|
+
:application_version => '0.1.2',
|
221
231
|
:retries => 1)
|
222
232
|
|
223
233
|
if @auth_method == 'private_key'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-google-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-11-
|
13
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
- - ! '>='
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 1.17.0
|
79
|
-
description: Fluentd plugin to stream logs to the Google Cloud Platform's
|
80
|
-
which will make them viewable in the Developer Console's log viewer and can
|
81
|
-
store them in Google Cloud Storage and/or BigQuery. This is an official
|
82
|
-
gem.
|
79
|
+
description: Fluentd plugin to stream logs to the Google Cloud Platform's logging
|
80
|
+
API, which will make them viewable in the Developer Console's log viewer and can
|
81
|
+
optionally store them in Google Cloud Storage and/or BigQuery. This is an official
|
82
|
+
Google Ruby gem.
|
83
83
|
email:
|
84
84
|
- salty@google.com
|
85
85
|
executables: []
|
@@ -119,7 +119,7 @@ rubyforge_project:
|
|
119
119
|
rubygems_version: 1.8.23
|
120
120
|
signing_key:
|
121
121
|
specification_version: 3
|
122
|
-
summary: Fluentd plugin to stream logs to the Google Cloud Platform's
|
122
|
+
summary: Fluentd plugin to stream logs to the Google Cloud Platform's logging API
|
123
123
|
test_files:
|
124
124
|
- test/helper.rb
|
125
125
|
- test/plugin/data/c31e573fd7f62ed495c9ca3821a5a85cb036dee1-privatekey.p12
|