stripe 3.31.0 → 3.31.1

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
  SHA1:
3
- metadata.gz: 52baaa63153c557126fa6561e14c544fc5fbbb40
4
- data.tar.gz: 89e88d7e7730d54188f73270e354b4027ff3ca2e
3
+ metadata.gz: 25ebfbf84bcee0acb6cab757e949ab8654b7e41d
4
+ data.tar.gz: '09546cf8adf0ad0dbfabd54675e256edfabdfab5'
5
5
  SHA512:
6
- metadata.gz: db6c1475916245fe94df52771b1a954a25653278e3af489310bbbdf598bf49f4b97db0f7a3dfd0665bc24979c006388c70490e6909678e0e3388a9c54172127a
7
- data.tar.gz: 58930d60e01262bc61a80953784a6f6b8bab7224f97af80fc550a39982cd663b76b6cf4e99896915f74d1f68b561cb8b84e4ed0db264626e63d89d5f25a24215
6
+ metadata.gz: c10a085b2465b5da8ba4490d6c34cd25be875fa5bdb0de22e4e02c25b457d7d57bf8476c8126c0a2f1c7df9d4f0b4a401f0341b0bc2b230cd3cc535b40e40f9d
7
+ data.tar.gz: 6779c4a2e3561ec53bc52a929cb51c17d9b17b2eea2ffb35f511924a84a8690be9f32022055de581d165a34d45adb2e74598583ae532cd13a5e47db3277e0ef4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.31.1 - 2018-11-12
4
+ * [#697](https://github.com/stripe/stripe-ruby/pull/697) Send telemetry in milliseconds specifically
5
+
3
6
  ## 3.31.0 - 2018-11-12
4
7
  * [#696](https://github.com/stripe/stripe-ruby/pull/696) Add configurable telemetry to gather information on client-side request latency
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.31.0
1
+ 3.31.1
@@ -219,7 +219,8 @@ module Stripe
219
219
  context = context.dup_from_response(resp)
220
220
  log_response(context, request_start, resp.status, resp.body)
221
221
  if Stripe.enable_telemetry?
222
- @last_request_metrics = StripeRequestMetrics.new(context.request_id, Time.now - request_start)
222
+ request_duration_ms = ((Time.now - request_start) * 1000).to_int
223
+ @last_request_metrics = StripeRequestMetrics.new(context.request_id, request_duration_ms)
223
224
  end
224
225
 
225
226
  # We rescue all exceptions from a request so that we have an easy spot to
@@ -607,16 +608,16 @@ module Stripe
607
608
  # The Stripe request ID of the response.
608
609
  attr_accessor :request_id
609
610
 
610
- # Request duration
611
- attr_accessor :request_duration
611
+ # Request duration in milliseconds
612
+ attr_accessor :request_duration_ms
612
613
 
613
- def initialize(request_id, request_duration)
614
- self.request_id = request_id
615
- self.request_duration = request_duration
614
+ def initialize(request_id, request_duration_ms)
615
+ self.request_id = request_id
616
+ self.request_duration_ms = request_duration_ms
616
617
  end
617
618
 
618
619
  def payload
619
- { request_id: request_id, request_duration: request_duration }
620
+ { request_id: request_id, request_duration_ms: request_duration_ms }
620
621
  end
621
622
  end
622
623
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "3.31.0".freeze
4
+ VERSION = "3.31.1".freeze
5
5
  end
@@ -791,7 +791,7 @@ module Stripe
791
791
 
792
792
  trace_payload = JSON.parse(trace_metrics_header)
793
793
  assert(trace_payload["last_request_metrics"]["request_id"] == "req_123")
794
- assert(!trace_payload["last_request_metrics"]["request_duration"].nil?)
794
+ assert(!trace_payload["last_request_metrics"]["request_duration_ms"].nil?)
795
795
  end
796
796
  end
797
797
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.31.0
4
+ version: 3.31.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-12 00:00:00.000000000 Z
11
+ date: 2018-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday