builder_apm 0.5.10 → 0.5.11

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: 76836856ebaf118f3b50eb04f1e03a9dcdcb1d3779a197c178bce179e895bbc4
4
- data.tar.gz: 1590eb4a9204c231cdeb32683745d97c84656ab655641eb84eea4ae30de8d96d
3
+ metadata.gz: 02760fa88241646b4ddb87a554d821ecf18890d0e9c4d70dcceffd1b46b2778a
4
+ data.tar.gz: 4ebd515ffcfad5572b968698223e1aafbe625c53bfb3c1a59540e9f6ba832933
5
5
  SHA512:
6
- metadata.gz: 06fce8a116b3a6edee614ed982b5e83e648c6bfdf4a2166336a182898f3acb04e290639bc982702cea0a34cefa8aefe8bc86ca29156f9714d18bc7c814d88313
7
- data.tar.gz: 7d9e190154d9b178f3eb7ea921fe0918e047ea99cbb6a4bcd7a424b5e88a8db594afeab1f74377f1cd25fe116c91c5b8c3b62a98ba38f758a9488725d8f07c0b
6
+ metadata.gz: e9c141994b8b2afc5c623a88b8edc5138448ef34ed61405afd7f0d5f42454f1575366e73a179ef4a1819245818b060886474bdbeb38eec31bcd809443d63d357
7
+ data.tar.gz: 516d69507027b4fd00edb38b79299cb92b30e6561442742b28e14c34f32efd53cc01c21fc7122a262fcce38d227fa21ddb1e8b1495f57fa5083662885e72f127
@@ -10,7 +10,7 @@ module BuilderApm
10
10
  def start
11
11
  @trace = setup_trace
12
12
  @trace.enable
13
- self
13
+ Thread.current[:trace_point] = @trace
14
14
  end
15
15
 
16
16
  def stop
@@ -40,7 +40,7 @@ module BuilderApm
40
40
  end
41
41
 
42
42
  def process_trace_point(tp)
43
- if tp.event == :call || tp.event == :b_call || tp.event == :c_call
43
+ if tp.event == :call
44
44
  method_id = "#{tp.defined_class}##{tp.method_id}"
45
45
  (@call_times[method_id]||= []) << Process.clock_gettime(Process::CLOCK_MONOTONIC)
46
46
  caller_info = caller_locations(4,1).first
@@ -15,12 +15,14 @@ module BuilderApm
15
15
  Thread.current[:db_runtime] = 0
16
16
  Thread.current[:method_tracing] = 0
17
17
  Thread.current[:db_tracing] = 0
18
- @trace = BuilderApm::Methods::Instrumenter.new.start if BuilderApm.configuration.enable_methods_profiler
18
+ Thread.current[:trace_point].disable if Thread.current[:trace_point]
19
+ Thread.current[:trace_point] = nil
20
+ BuilderApm::Methods::Instrumenter.new.start if BuilderApm.configuration.enable_methods_profiler
19
21
 
20
22
  @status, @headers, @response = @app.call(env)
21
23
 
22
24
  ensure
23
- @trace.stop if BuilderApm.configuration.enable_methods_profiler
25
+ Thread.current[:trace_point].disable if Thread.current[:trace_point]
24
26
  end_time = Time.now.to_f * 1000
25
27
  handle_timing(start_time, end_time, request_id)
26
28
 
@@ -1,3 +1,3 @@
1
1
  module BuilderApm
2
- VERSION = "0.5.10"
2
+ VERSION = "0.5.11"
3
3
  end
@@ -2,8 +2,6 @@ BuilderApm.configure do |config|
2
2
  config.redis_url = 'redis://localhost:6379/0' # optional - defaults to 'redis://localhost:6379/0'
3
3
  config.api_key = ENV["OPENAI_API_KEY"] #required only if you want to use Ai Doctor
4
4
  config.api = "Bravo" # optional - default to 'Bravo' - "Bravo" - internal Ai / "OpenAi" - use openai ChatGPT
5
- config.gems_to_track = [] # optional - default to empty array []
6
- config.enable_controller_profiler = true # optional - defaults to true
7
5
  config.enable_active_record_profiler = true # optional - defaults to true
8
6
  config.enable_methods_profiler = true # optional - defaults to true
9
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builder_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.10
4
+ version: 0.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Ketelle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-26 00:00:00.000000000 Z
11
+ date: 2023-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.1.4
133
+ rubygems_version: 3.1.0
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Write a short summary, because RubyGems requires one.