rack-honeycomb 0.0.13 → 0.0.14

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: 23da102ec755cd055d472a407e36fd02df3796a9af60d957c04cf9242228703a
4
- data.tar.gz: 3f1b249d27b9f3e4cd6371c148b3781c50acd42b821059a7b802912f66e8ef84
3
+ metadata.gz: 87942acd38f5a7ec92e37e9edeca57b7c475c445b2774f9c4a92f6f7d926f0d1
4
+ data.tar.gz: 153711d7c16fc72fd2466ee15b7ffe9c04eca428695e0bcb1cd98f650c648f83
5
5
  SHA512:
6
- metadata.gz: d421a148c1f9960f9d8bcc6f98b6c60f09fb05906c07821b716e485b982df1c0571555e35020f57dcb8b293d6c0dc1a4f990061cf0034f42276f7212a9a7574f
7
- data.tar.gz: 02a918dcb2f0da034e66ddce8a30375b843caaae1beb0e3926beb562fc08059da8363e061d62d5ce6f27ea036c6ccab8f68377d6051b5c93e0be7c1468898837
6
+ metadata.gz: 3ac383fef4a60b694b89f946f826d294d21fc2bc1e8dda52b31fc6f1cba795bfe8d7bbef30541ee1a1682545fd693837ca8a144fb3e73abbe33637bfa0165e20
7
+ data.tar.gz: b1912defa21adced2b1133c1fcf3b0d1a706afb1dc8160216fca2b78cbe4d79a962d390e4570dce393be2721c0263e94b90fdcd4fd49cd2db32e75b2de26a744
data/README.md CHANGED
@@ -4,17 +4,6 @@ This is Rack middleware that sends request/response data to [Honeycomb](https://
4
4
 
5
5
  For more information about using Honeycomb, check out our [docs](https://honeycomb.io/docs) and our [Ruby SDK](https://honeycomb.io/docs/connect/ruby/).
6
6
 
7
- ## Adding instrumentation to a Rails application
8
-
9
- ```ruby
10
- # config/application.rb
11
- require 'rack/honeycomb'
12
-
13
- class Application < Rails::Application
14
- config.middleware.use Rack::Honeycomb::Middleware, writekey: "<YOUR WRITEKEY HERE>", dataset: "<YOUR DATASET NAME HERE>"
15
- end
16
- ```
17
-
18
7
  ## Adding instrumentation to a Sinatra application
19
8
 
20
9
  ```ruby
@@ -27,6 +16,21 @@ use Rack::Honeycomb::Middleware, writekey: "<YOUR WRITEKEY HERE>", dataset: "<YO
27
16
  get('/hello') { "Hello, world!\n" }
28
17
  ```
29
18
 
19
+ ## Adding instrumentation to a Rails application
20
+
21
+ For more fully-featured Rails support, see [honeycomb-rails](https://github.com/honeycombio/honeycomb-rails).
22
+
23
+ If honeycomb-rails doesn't work for you, this Rack middleware should work for Rails apps too:
24
+
25
+ ```ruby
26
+ # config/application.rb
27
+ require 'rack/honeycomb'
28
+
29
+ class Application < Rails::Application
30
+ config.middleware.use Rack::Honeycomb::Middleware, writekey: "<YOUR WRITEKEY HERE>", dataset: "<YOUR DATASET NAME HERE>"
31
+ end
32
+ ```
33
+
30
34
  ## Installation
31
35
 
32
36
  To install the latest stable release of `rack-honeycomb`, simply:
@@ -47,6 +51,10 @@ To follow the bleeding edge, it's easy to track the git repo:
47
51
  gem "rack-honeycomb", :git => "https://github.com/honeycombio/rack-honeycomb.git"
48
52
  ```
49
53
 
54
+ ## Documentation
55
+
56
+ See [rubydoc](http://www.rubydoc.info/gems/rack-honeycomb/) for gem documentation.
57
+
50
58
  ## Contributions
51
59
 
52
60
  Features, bug fixes and other changes are gladly accepted. Please
@@ -36,9 +36,9 @@ module Rack
36
36
  request_ended_at = Time.now
37
37
 
38
38
  ev.add(headers)
39
- if headers[CONTENT_LENGTH] != nil
39
+ if headers['Content-Length'] != nil
40
40
  # Content-Length (if present) is a string. let's change it to an int.
41
- ev.add_field(CONTENT_LENGTH, headers[CONTENT_LENGTH].to_i)
41
+ ev.add_field('Content-Length', headers['Content-Length'].to_i)
42
42
  end
43
43
  add_field(ev, 'HTTP_STATUS', status)
44
44
  add_field(ev, 'REQUEST_TIME_MS', (request_ended_at - request_started_at) * 1000)
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Honeycomb
3
- VERSION="0.0.13"
3
+ VERSION="0.0.14"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-honeycomb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Honeycomb.io Team
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  requirements: []
188
188
  rubyforge_project:
189
- rubygems_version: 2.7.2
189
+ rubygems_version: 2.7.3
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Rack middleware for logging request data to Honeycomb.