appsignal 0.8.1.beta.2 → 0.8.1.beta.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDFlZGY5MmI0ZDU3ZjRkNWViMzI2YTk4M2IyYjcxNmIxM2QwOTg2Yg==
4
+ M2FhOGZhNTJjZWFhNGFiYjY4NTBjM2RjOGFjYTJkNzBjOTFlNTZlMA==
5
5
  data.tar.gz: !binary |-
6
- Y2UyYTY2NDg4MTA2NDk0NDcxYjdiNDZmYWUwMDIxMmNjNmYyNjIxNg==
6
+ YzVjYTcyYzk4NDUyN2E1MzMwNGNmZTA5NjBlNjBlZDA3NmM4NmY5Yg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NDZhYTdkYjYyN2I2NGI2MzRkOTc2NzdiNjdiMmFkYzY4ZWNjMTA1NjMwYmI1
10
- ZWE1NDBlMzdhZGY2NDI1OTVmNzA4YWI4MmEzNjI2YjM1YWI2NzIyYzc1ZmMx
11
- N2I1YTk3MjY1MDNjYjE2MmRmZDYwZWU1N2M2ZjYyZWRiNjhjODY=
9
+ YzZmMWNiZjAzYTA4N2VhNmZhNjA3MDM3NDUwMDE4NmRhMWVjNTQ3ZGU4Mzli
10
+ M2RjMjY3MjBiZjFiMDU0ZGU3YWZhYWFmOGRkNjNiMjVmMWExMDJmNzUxOGYx
11
+ MGNhMDYzYTIyZGFmMDYxNTc0NjI2MDVhNjIyNzA0NDRmM2RkMjc=
12
12
  data.tar.gz: !binary |-
13
- YWZmOTczYzQ4OWUwNzI1ZWJkMWIxZDExMmNkYTg3YjBhNjdiZDdlM2MwOGVj
14
- MTdhZGE2OWI4ZjJkZDNmNDI2Mjg5MWFjNDUyMjhkZGNmNmExNjZjMzZlNGYz
15
- YjA1YTk0MDI5ZWFhZjJlMzgyMmYwMjk1MzFiNGFiMDE3NGI2YTU=
13
+ ODUyYTJmYzExMzgyYmJmYThmNzU3MzZhZGE1N2IxMTA4NTQ1YWUwY2RlNmZh
14
+ YTQyZGJhNTQxNDk3MjJhOWUxZWVkNTY0MGJjMjE1NDFiNzI1MWNjNjA4Yjlm
15
+ ZDNkNjEyYzlkZTY3NzAyOGE3YzM2OTEzNTlkZmM2NGM2NGI2MmI=
@@ -137,7 +137,7 @@ module Appsignal
137
137
  Appsignal.logger.debug("Setting http queue start: #{env_var}")
138
138
  value = env_var.tr('^0-9', '')
139
139
  unless value.empty?
140
- @queue_start = value.to_f
140
+ @queue_start = value.to_f / 1000
141
141
  end
142
142
  end
143
143
  end
@@ -50,7 +50,7 @@ module Appsignal
50
50
 
51
51
  def add_queue_duration_to_hash!
52
52
  return unless queue_start && queue_start > 0
53
- hash[:log_entry][:queue_duration] = hash[:log_entry][:time] - queue_start
53
+ hash[:log_entry][:queue_duration] = 1000.0 * (hash[:log_entry][:time] - queue_start)
54
54
  end
55
55
 
56
56
  def add_tags_to_hash!
@@ -1,3 +1,3 @@
1
1
  module Appsignal
2
- VERSION = '0.8.1.beta.2'
2
+ VERSION = '0.8.1.beta.3'
3
3
  end
@@ -124,7 +124,7 @@ describe Appsignal::Transaction::Formatter do
124
124
  :action => "BackgroundJob#perform",
125
125
  :duration => be_within(0.01).of(100.0),
126
126
  :end => 1389783600.1,
127
- :queue_duration => 10.0,
127
+ :queue_duration => 10000.0,
128
128
  :priority => 1,
129
129
  :attempts => 0,
130
130
  :queue => 'default',
@@ -354,8 +354,8 @@ describe Appsignal::Transaction do
354
354
  end
355
355
 
356
356
  describe "#set_http_queue_start" do
357
- let(:slightly_earlier_time) { fixed_time - 10 }
358
- let(:slightly_earlier_time_in_ms) { slightly_earlier_time.to_i }
357
+ let(:slightly_earlier_time) { fixed_time - 0.4 }
358
+ let(:slightly_earlier_time_in_ms) { (slightly_earlier_time.to_f * 1000).to_i }
359
359
  before { transaction.set_http_queue_start }
360
360
  subject { transaction.queue_start }
361
361
 
@@ -374,7 +374,7 @@ describe Appsignal::Transaction do
374
374
  context "with the HTTP_X_REQUEST_START header set" do
375
375
  let(:env) { {'HTTP_X_REQUEST_START' => "t=#{slightly_earlier_time_in_ms}"} }
376
376
 
377
- it { should == 1389783590.0 }
377
+ it { should == 1389783599.6 }
378
378
 
379
379
  context "with unparsable content" do
380
380
  let(:env) { {'HTTP_X_REQUEST_START' => 'something'} }
@@ -385,13 +385,13 @@ describe Appsignal::Transaction do
385
385
  context "with some cruft" do
386
386
  let(:env) { {'HTTP_X_REQUEST_START' => "t=#{slightly_earlier_time_in_ms}aaaa"} }
387
387
 
388
- it { should == 1389783590.0 }
388
+ it { should == 1389783599.6 }
389
389
  end
390
390
 
391
391
  context "with the alternate HTTP_X_QUEUE_START header set" do
392
392
  let(:env) { {'HTTP_X_QUEUE_START' => "t=#{slightly_earlier_time_in_ms}"} }
393
393
 
394
- it { should == 1389783590.0 }
394
+ it { should == 1389783599.6 }
395
395
  end
396
396
  end
397
397
  end
@@ -32,7 +32,7 @@ module NotificationHelpers
32
32
  :priority => 1,
33
33
  :attempts => 0,
34
34
  :queue => 'default',
35
- :queue_start => fixed_time - 10,
35
+ :queue_start => fixed_time - 10.0,
36
36
  }.merge(args)
37
37
  end
38
38
  end
@@ -33,7 +33,7 @@ module TransactionHelpers
33
33
  def regular_transaction_with_x_request_start
34
34
  appsignal_transaction(
35
35
  :process_action_event => notification_event,
36
- 'HTTP_X_REQUEST_START' => "t=#{(fixed_time - 40.0).to_i}"
36
+ 'HTTP_X_REQUEST_START' => "t=#{((fixed_time - 0.04) * 1000).to_i}"
37
37
  )
38
38
  end
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1.beta.2
4
+ version: 0.8.1.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman