Skip to content

Commit f426210

Browse files
committed
fix: Address stack overflow error with tracing?
1 parent cda7074 commit f426210

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/appmap/agent.rb

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ def info(msg)
5757
end
5858
end
5959

60+
def tracing_enabled?
61+
return false unless @tracing
62+
63+
@tracing.enabled?
64+
end
65+
6066
# Used to start tracing, stop tracing, and record events.
6167
def tracing
6268
@tracing ||= Trace::Tracing.new

lib/appmap/hook/method.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def gettime
8383
end
8484

8585
def trace?
86-
return false unless AppMap.tracing.enabled?
86+
return false unless AppMap.tracing_enabled?
8787
return false if Thread.current[HOOK_DISABLE_KEY]
8888
return false if hook_package&.shallow? && AppMap.tracing.last_package_for_current_thread == hook_package
8989

0 commit comments

Comments
 (0)