appsignal 2.8.4.beta.1-java → 2.8.4-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/lib/appsignal.rb +1 -1
- data/lib/appsignal/transaction.rb +3 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/transaction_spec.rb +41 -6
- data/spec/lib/appsignal_spec.rb +11 -11
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6c51056cc45697339edad0c7229bea1d7097fc4e7c339197fcd4a41c65b9ba2
|
4
|
+
data.tar.gz: fb18f33d2c554adeea7181b36e0eb9dc3556a7d165e67b7a3e827586c42ca845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe31ea0e9ce501ab473a0813d81c1d5191ddbc5fc99265633393a497d8a89aa7cf6e19778fa0ceda621c5eac0fbedc12176caf6f80eb3879638a60419075bfda
|
7
|
+
data.tar.gz: 3e1c72e0b453e4aa2d758efa511aff1735039dd442121f00dba87ef52b04912c031400dc6acd52e35920c55244f05dd41afd118953e4b14958d0381a198888da
|
data/CHANGELOG.md
CHANGED
data/lib/appsignal.rb
CHANGED
@@ -752,7 +752,7 @@ module Appsignal
|
|
752
752
|
end
|
753
753
|
deprecate :is_ignored_action?, :none, 2017, 3
|
754
754
|
|
755
|
-
# Convenience method for skipping
|
755
|
+
# Convenience method for skipping instrumentation around a block of code.
|
756
756
|
#
|
757
757
|
# @example
|
758
758
|
# Appsignal.without_instrumentation do
|
@@ -277,10 +277,12 @@ module Appsignal
|
|
277
277
|
alias_method :add_exception, :set_error
|
278
278
|
|
279
279
|
def start_event
|
280
|
+
return if paused?
|
280
281
|
@ext.start_event(self.class.garbage_collection_profiler.total_time)
|
281
282
|
end
|
282
283
|
|
283
284
|
def finish_event(name, title, body, body_format = Appsignal::EventFormatter::DEFAULT)
|
285
|
+
return if paused?
|
284
286
|
@ext.finish_event(
|
285
287
|
name,
|
286
288
|
title || BLANK,
|
@@ -291,6 +293,7 @@ module Appsignal
|
|
291
293
|
end
|
292
294
|
|
293
295
|
def record_event(name, title, body, duration, body_format = Appsignal::EventFormatter::DEFAULT)
|
296
|
+
return if paused?
|
294
297
|
@ext.record_event(
|
295
298
|
name,
|
296
299
|
title || BLANK,
|
data/lib/appsignal/version.rb
CHANGED
@@ -214,7 +214,7 @@ describe Appsignal::Transaction do
|
|
214
214
|
|
215
215
|
context "pausing" do
|
216
216
|
describe "#pause!" do
|
217
|
-
it "
|
217
|
+
it "changes the pause flag to true" do
|
218
218
|
expect do
|
219
219
|
transaction.pause!
|
220
220
|
end.to change(transaction, :paused).from(false).to(true)
|
@@ -224,7 +224,7 @@ describe Appsignal::Transaction do
|
|
224
224
|
describe "#resume!" do
|
225
225
|
before { transaction.pause! }
|
226
226
|
|
227
|
-
it "
|
227
|
+
it "changes the pause flag to false" do
|
228
228
|
expect do
|
229
229
|
transaction.resume!
|
230
230
|
end.to change(transaction, :paused).from(true).to(false)
|
@@ -232,14 +232,16 @@ describe Appsignal::Transaction do
|
|
232
232
|
end
|
233
233
|
|
234
234
|
describe "#paused?" do
|
235
|
-
|
236
|
-
|
235
|
+
context "when not paused" do
|
236
|
+
it "return false" do
|
237
|
+
expect(transaction.paused?).to be_falsy
|
238
|
+
end
|
237
239
|
end
|
238
240
|
|
239
241
|
context "when paused" do
|
240
242
|
before { transaction.pause! }
|
241
243
|
|
242
|
-
it "
|
244
|
+
it "returns true" do
|
243
245
|
expect(transaction.paused?).to be_truthy
|
244
246
|
end
|
245
247
|
end
|
@@ -690,11 +692,20 @@ describe Appsignal::Transaction do
|
|
690
692
|
end
|
691
693
|
|
692
694
|
describe "#start_event" do
|
693
|
-
it "
|
695
|
+
it "starts the event in the extension" do
|
694
696
|
expect(transaction.ext).to receive(:start_event).with(0).and_call_original
|
695
697
|
|
696
698
|
transaction.start_event
|
697
699
|
end
|
700
|
+
|
701
|
+
context "when transaction is paused" do
|
702
|
+
it "does not start the event" do
|
703
|
+
transaction.pause!
|
704
|
+
expect(transaction.ext).to_not receive(:start_event)
|
705
|
+
|
706
|
+
transaction.start_event
|
707
|
+
end
|
708
|
+
end
|
698
709
|
end
|
699
710
|
|
700
711
|
describe "#finish_event" do
|
@@ -737,6 +748,15 @@ describe Appsignal::Transaction do
|
|
737
748
|
nil
|
738
749
|
)
|
739
750
|
end
|
751
|
+
|
752
|
+
context "when transaction is paused" do
|
753
|
+
it "does not finish the event" do
|
754
|
+
transaction.pause!
|
755
|
+
expect(transaction.ext).to_not receive(:finish_event)
|
756
|
+
|
757
|
+
transaction.start_event
|
758
|
+
end
|
759
|
+
end
|
740
760
|
end
|
741
761
|
|
742
762
|
describe "#record_event" do
|
@@ -783,6 +803,21 @@ describe Appsignal::Transaction do
|
|
783
803
|
nil
|
784
804
|
)
|
785
805
|
end
|
806
|
+
|
807
|
+
context "when transaction is paused" do
|
808
|
+
it "does not record the event" do
|
809
|
+
transaction.pause!
|
810
|
+
expect(transaction.ext).to_not receive(:record_event)
|
811
|
+
|
812
|
+
transaction.record_event(
|
813
|
+
"name",
|
814
|
+
nil,
|
815
|
+
nil,
|
816
|
+
1000,
|
817
|
+
nil
|
818
|
+
)
|
819
|
+
end
|
820
|
+
end
|
786
821
|
end
|
787
822
|
|
788
823
|
describe "#instrument" do
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -831,25 +831,25 @@ describe Appsignal do
|
|
831
831
|
end
|
832
832
|
|
833
833
|
describe ".without_instrumentation" do
|
834
|
-
let(:transaction) {
|
834
|
+
let(:transaction) { http_request_transaction }
|
835
835
|
before { allow(Appsignal::Transaction).to receive(:current).and_return(transaction) }
|
836
836
|
|
837
|
-
it "
|
838
|
-
expect(transaction).to receive(:pause!)
|
839
|
-
expect(transaction).to receive(:resume!)
|
837
|
+
it "does not record events on the transaction" do
|
838
|
+
expect(transaction).to receive(:pause!).and_call_original
|
839
|
+
expect(transaction).to receive(:resume!).and_call_original
|
840
|
+
Appsignal.instrument("register.this.event") { :do_nothing }
|
841
|
+
Appsignal.without_instrumentation do
|
842
|
+
Appsignal.instrument("dont.register.this.event") { :do_nothing }
|
843
|
+
end
|
844
|
+
expect(transaction.to_h["events"].map { |e| e["name"] })
|
845
|
+
.to match_array("register.this.event")
|
840
846
|
end
|
841
847
|
|
842
848
|
context "without transaction" do
|
843
849
|
let(:transaction) { nil }
|
844
850
|
|
845
851
|
it "should not crash" do
|
846
|
-
|
847
|
-
end
|
848
|
-
end
|
849
|
-
|
850
|
-
after do
|
851
|
-
Appsignal.without_instrumentation do
|
852
|
-
# nothing
|
852
|
+
Appsignal.without_instrumentation { :do_nothing }
|
853
853
|
end
|
854
854
|
end
|
855
855
|
end
|
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: 2.8.4
|
4
|
+
version: 2.8.4
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-02-
|
12
|
+
date: 2019-02-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -384,12 +384,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
384
384
|
version: '1.9'
|
385
385
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
386
386
|
requirements:
|
387
|
-
- - "
|
387
|
+
- - ">="
|
388
388
|
- !ruby/object:Gem::Version
|
389
|
-
version:
|
389
|
+
version: '0'
|
390
390
|
requirements: []
|
391
|
-
|
392
|
-
rubygems_version: 2.7.6
|
391
|
+
rubygems_version: 3.0.2
|
393
392
|
signing_key:
|
394
393
|
specification_version: 4
|
395
394
|
summary: Logs performance and exception data from your app to appsignal.com
|