trd-rails-collector 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/trd-rails-collector.rb +5 -4
- metadata +4 -4
data/lib/trd-rails-collector.rb
CHANGED
@@ -198,8 +198,9 @@ EOF
|
|
198
198
|
end
|
199
199
|
|
200
200
|
header = {}
|
201
|
-
header['Authorization'] = "
|
201
|
+
header['Authorization'] = "TD1 #{@apikey}"
|
202
202
|
header['Date'] = Time.now.rfc2822
|
203
|
+
header['Content-Type'] = 'application/octet-stream'
|
203
204
|
header['Content-Length'] = data.size.to_s
|
204
205
|
|
205
206
|
url = "/v3/table/import/#{e @db}/#{e @table}/msgpack.gz"
|
@@ -255,17 +256,17 @@ EOF
|
|
255
256
|
m = {}
|
256
257
|
|
257
258
|
# compatibility for fluent's apache log parser
|
258
|
-
m['host'] = env['
|
259
|
+
m['host'] = env['REMOTE_ADDR']
|
259
260
|
m['method'] = env['REQUEST_METHOD']
|
260
261
|
# TODO m['user']
|
261
262
|
m['path'] = env['PATH_INFO']
|
262
263
|
m['code'] = r[0].to_i
|
263
264
|
m['size'] = r[1]['Content-Length'].to_i
|
264
|
-
m['referer'] = env['HTTP_REFERER']
|
265
|
+
m['referer'] = env['HTTP_REFERER']
|
265
266
|
m['agent'] = env['HTTP_USER_AGENT']
|
266
267
|
|
267
268
|
# additional information
|
268
|
-
m['server'] = env['SERVER_NAME']
|
269
|
+
#m['server'] = env['SERVER_NAME']
|
269
270
|
|
270
271
|
# parameters
|
271
272
|
PARAM_KEYS.each {|key|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trd-rails-collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sadayuki Furuhashi
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06
|
18
|
+
date: 2011-08-06 00:00:00 +09:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|