Skip to content

Commit 142e17c

Browse files
authored
L-848 Detect context.runtime using frame.absolute_path or frame.path (#25)
1 parent 3017fd4 commit 142e17c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/logtail/log_entry.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ def convert_to_runtime_context(frame)
134134
end
135135

136136
def logtail_logger_frame?(frame)
137-
!frame.absolute_path.nil? && frame.absolute_path.end_with?(LOGGER_FILE)
137+
!frame.path.nil? && frame.path.end_with?(LOGGER_FILE)
138138
end
139139

140140
def path_relative_to_app_root(frame)
141141
Pathname.new(frame.absolute_path).relative_path_from(root_path).to_s
142142
rescue
143-
frame.absolute_path
143+
frame.absolute_path || frame.path
144144
end
145145

146146
def root_path

0 commit comments

Comments
 (0)