rack-honeycomb 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/README.md +2 -2
- data/lib/rack/honeycomb/middleware.rb +3 -5
- data/lib/rack/honeycomb/version.rb +1 -1
- data/rack-honeycomb.gemspec +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 485f7d9d90d3f84948566d02f50abfab41b36ed86a90c8e06088f615d6034fba
|
4
|
+
data.tar.gz: 5657dc7faa7598c0f9c2e8b9b9c46f056e85bb5cb4554993271bb9e1b5ba141e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cadceca7ecc0ddcafee11cd04a702542696fa407c6749528936db64b97f7ece954ddf8d4d4b1ca788126b768baa450e56c1ea0e3a91c64b544fca534b333219
|
7
|
+
data.tar.gz: 50da0855c31832b2be030f0fab1493f6f7e34e905e689ef27ee61de31f6de715bec80c294240202ecfdf63b39cacb51a979811afc41e49d0c446e858628cd7a5
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@ For more information about using Honeycomb, check out our [docs](https://honeyco
|
|
6
6
|
|
7
7
|
## Adding instrumentation to a Sinatra application
|
8
8
|
|
9
|
-
Attaching the middleware is simple. Inside handlers, you also have the choice of attaching custom
|
9
|
+
Attaching the middleware is simple. Inside handlers, you also have the choice of attaching custom fields to be added to the events sent to Honeycomb.
|
10
10
|
|
11
11
|
```ruby
|
12
12
|
#!/usr/bin/env ruby -rubygems
|
@@ -16,7 +16,7 @@ require 'rack/honeycomb'
|
|
16
16
|
use Rack::Honeycomb::Middleware, writekey: "<YOUR WRITEKEY HERE>", dataset: "<YOUR DATASET NAME HERE>"
|
17
17
|
|
18
18
|
get('/hello') do
|
19
|
-
|
19
|
+
Rack::Honeycomb.add_field :greeting, 'hello'
|
20
20
|
"Hello, world!\n"
|
21
21
|
end
|
22
22
|
```
|
@@ -18,7 +18,7 @@ module Rack
|
|
18
18
|
class Middleware
|
19
19
|
ENV_REGEX = /^#{ Regexp.escape ENV_PREFIX }/
|
20
20
|
USER_AGENT_SUFFIX = "rack-honeycomb/#{VERSION}"
|
21
|
-
EVENT_TYPE = '
|
21
|
+
EVENT_TYPE = 'http_server'.freeze
|
22
22
|
|
23
23
|
##
|
24
24
|
# @param [#call] app
|
@@ -115,11 +115,9 @@ module Rack
|
|
115
115
|
return yield unless defined?(::Honeycomb.with_trace_id)
|
116
116
|
|
117
117
|
::Honeycomb.with_trace_id do |trace_id|
|
118
|
-
event.add_field
|
119
|
-
event.add_field :serviceName, @service_name
|
120
|
-
event.add_field :name, "#{env['REQUEST_METHOD']} #{env['REQUEST_PATH']}"
|
118
|
+
event.add_field 'trace.id', trace_id
|
121
119
|
span_id = trace_id # so this shows up as a root span
|
122
|
-
event.add_field
|
120
|
+
event.add_field 'trace.span_id', span_id
|
123
121
|
::Honeycomb.with_span_id(span_id) do
|
124
122
|
yield
|
125
123
|
end
|
data/rack-honeycomb.gemspec
CHANGED
@@ -8,7 +8,6 @@ require "rack/honeycomb/version"
|
|
8
8
|
Gem::Specification.new do |spec|
|
9
9
|
spec.name = 'rack-honeycomb'
|
10
10
|
spec.version = Rack::Honeycomb::VERSION
|
11
|
-
spec.date = "2016-11-17"
|
12
11
|
|
13
12
|
spec.homepage = 'https://github.com/honeycombio/rack-honeycomb'
|
14
13
|
spec.license = 'Apache-2.0'
|
@@ -35,5 +34,6 @@ Gem::Specification.new do |spec|
|
|
35
34
|
spec.add_runtime_dependency 'libhoney', '>= 1.5.0'
|
36
35
|
spec.add_development_dependency 'rspec'
|
37
36
|
spec.add_development_dependency 'rack-test'
|
37
|
+
spec.add_development_dependency 'sinatra'
|
38
38
|
spec.add_development_dependency 'yard'
|
39
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-honeycomb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Honeycomb.io Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sinatra
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: yard
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
176
|
version: '0'
|
163
177
|
requirements: []
|
164
178
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.7.
|
179
|
+
rubygems_version: 2.7.7
|
166
180
|
signing_key:
|
167
181
|
specification_version: 4
|
168
182
|
summary: Rack middleware for logging request data to Honeycomb.
|