fluent-plugin-buffered-metrics 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/lib/fluent/metrics_backends.rb +16 -12
- metadata +3 -3
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
@@ -171,12 +171,14 @@ module Fluent
|
|
171
171
|
end
|
172
172
|
|
173
173
|
def serialize_entry(entry,time)
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
174
|
+
unless entry.nil? or not entry.key?('name') or not entry.key?('value') or entry['name'].empty? or not entry['value'].is_a?(Numeric)
|
175
|
+
return sprintf(
|
176
|
+
'%s%s %s %i',
|
177
|
+
entry.key?('prefix') ? entry['prefix'] + '.' : '',
|
178
|
+
entry['name'],entry['value'].to_s,
|
179
|
+
time.to_i
|
180
|
+
)
|
181
|
+
end
|
180
182
|
end
|
181
183
|
|
182
184
|
end
|
@@ -188,12 +190,14 @@ module Fluent
|
|
188
190
|
end
|
189
191
|
|
190
192
|
def serialize_entry(entry,time)
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
193
|
+
unless entry.nil? or not entry.key?('name') or not entry.key?('value') or entry['name'].empty? or not entry['value'].is_a?(Numeric)
|
194
|
+
return sprintf(
|
195
|
+
'%s%s:%s|c',
|
196
|
+
entry.key?('prefix') ? entry['prefix'] + '.' : '',
|
197
|
+
entry['name'],
|
198
|
+
entry['value'].to_i
|
199
|
+
)
|
200
|
+
end
|
197
201
|
end
|
198
202
|
|
199
203
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-buffered-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alex Yamauchi
|
metadata.gz.sig
CHANGED
Binary file
|