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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e14df43e7812c1c6c4943e872d9fc71f653336d46ba04d97e15dcad5c8ef1b55
4
- data.tar.gz: 58e4a3cb98d1e9ecdcbf4f4175693d0783c175810e317b9dc80f10952abee9d0
3
+ metadata.gz: 485f7d9d90d3f84948566d02f50abfab41b36ed86a90c8e06088f615d6034fba
4
+ data.tar.gz: 5657dc7faa7598c0f9c2e8b9b9c46f056e85bb5cb4554993271bb9e1b5ba141e
5
5
  SHA512:
6
- metadata.gz: 68d18614019d1d0d16a95c8bd09b0a0f137ae7c838ebd2a0377d9c2d4a455a9f330eba458521ebd4fba836b328c89fd5b1aca79c8fcc7fc988a660873fe08ec3
7
- data.tar.gz: 8fd87ec1879faf03a28e85ece8a27a58de2a8d777f8d1df45ca9c7126c9b962a613cd3f42e8f1082d342a01f217e3df80c6c8a00b491cd499e8651f5ac299a7f
6
+ metadata.gz: 6cadceca7ecc0ddcafee11cd04a702542696fa407c6749528936db64b97f7ece954ddf8d4d4b1ca788126b768baa450e56c1ea0e3a91c64b544fca534b333219
7
+ data.tar.gz: 50da0855c31832b2be030f0fab1493f6f7e34e905e689ef27ee61de31f6de715bec80c294240202ecfdf63b39cacb51a979811afc41e49d0c446e858628cd7a5
data/.travis.yml CHANGED
@@ -3,8 +3,6 @@ rvm:
3
3
  - 2.2
4
4
  - 2.3
5
5
  - 2.4
6
- # TODO remove this line once we have tests to run
7
- script: "bundle exec ruby -Ilib -rrack/honeycomb/version -e 'puts Rack::Honeycomb::VERSION'"
8
6
  deploy:
9
7
  provider: rubygems
10
8
  gem: rack-honeycomb
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 metadata to be stripped off by the middleware.
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
- env[Rack::Honeycomb::ENV_PREFIX + "handler"] = "hello world handler"
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 = 'http_request'.freeze
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 :traceId, trace_id
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 :id, span_id
120
+ event.add_field 'trace.span_id', span_id
123
121
  ::Honeycomb.with_span_id(span_id) do
124
122
  yield
125
123
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Honeycomb
3
- VERSION="0.1.0"
3
+ VERSION="0.2.0"
4
4
  end
5
5
  end
@@ -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.1.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: 2016-11-17 00:00:00.000000000 Z
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.6
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.