qs-request-tracker 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ # 0.0.2 / 2013-08-12
2
+
3
+ * Adds a Raven processor to tag exceptions with the request id
4
+
1
5
  # 0.0.1 / 2013-08-12
2
6
 
3
7
  * Adds travis badge
@@ -0,0 +1,13 @@
1
+ if defined? ::Raven::Processor::Processor
2
+ module Qs::Request::Tracker
3
+ class RavenProcessor < ::Raven::Processor::Processor
4
+ def process(data)
5
+ if data && data['sentry.interfaces.Http'] && data['sentry.interfaces.Http']['headers'] && data['sentry.interfaces.Http']['headers'][Qs::Request::Tracker::HTTP_HEADER_FIELD]
6
+ data['tags'] ||= {}
7
+ data['tags']['request-id'] = data['sentry.interfaces.Http']['headers'][Qs::Request::Tracker::HTTP_HEADER_FIELD].to_s.gsub('-', '')
8
+ end
9
+ data
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,7 +1,7 @@
1
1
  module Qs
2
2
  module Request
3
3
  module Tracker
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qs-request-tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -156,6 +156,7 @@ files:
156
156
  - lib/qs/request/tracker.rb
157
157
  - lib/qs/request/tracker/faraday_middleware.rb
158
158
  - lib/qs/request/tracker/middleware.rb
159
+ - lib/qs/request/tracker/raven_processor.rb
159
160
  - lib/qs/request/tracker/service_client_extension.rb
160
161
  - lib/qs/request/tracker/version.rb
161
162
  - qs-request-tracker.gemspec