示例#1
0
 def _get_stack_info_for_trace(self,
                               frames,
                               library_frame_context_lines=None,
                               in_app_frame_context_lines=None,
                               with_locals=True,
                               locals_processor_func=None):
     """If the stacktrace originates within the elasticapm module, it will skip
     frames until some other module comes up."""
     frames = list(
         iterate_with_template_sources(
             frames,
             with_locals=with_locals,
             library_frame_context_lines=library_frame_context_lines,
             in_app_frame_context_lines=in_app_frame_context_lines,
             include_paths_re=self.include_paths_re,
             exclude_paths_re=self.exclude_paths_re,
             locals_processor_func=locals_processor_func,
         ))
     i = 0
     while len(frames) > i:
         if 'module' in frames[i] and not (
                 frames[i]['module'].startswith('elasticapm.')
                 or frames[i]['module'] == 'contextlib'):
             return frames[i:]
         i += 1
     return frames
示例#2
0
 def get_stack_info_for_trace(self, frames, extended=True):
     """If the stacktrace originates within the elasticapm module, it will skip
     frames until some other module comes up."""
     frames = list(iterate_with_template_sources(frames, extended))
     i = 0
     while len(frames) > i:
         if 'module' in frames[i] and not (
                 frames[i]['module'].startswith('elasticapm.')
                 or frames[i]['module'] == 'contextlib'):
             return frames[i:]
         i += 1
     return frames
示例#3
0
 def _get_stack_info_for_trace(self, frames,
                               library_frame_context_lines=None,
                               in_app_frame_context_lines=None,
                               with_locals=True,
                               locals_processor_func=None):
     """If the stacktrace originates within the elasticapm module, it will skip
     frames until some other module comes up."""
     return list(iterate_with_template_sources(
         frames,
         with_locals=with_locals,
         library_frame_context_lines=library_frame_context_lines,
         in_app_frame_context_lines=in_app_frame_context_lines,
         include_paths_re=self.include_paths_re,
         exclude_paths_re=self.exclude_paths_re,
         locals_processor_func=locals_processor_func,
     ))
示例#4
0
 def _get_stack_info_for_trace(self,
                               frames,
                               with_source_context=True,
                               with_locals=True):
     """If the stacktrace originates within the elasticapm module, it will skip
     frames until some other module comes up."""
     frames = list(
         iterate_with_template_sources(frames, with_source_context,
                                       with_locals, self.include_paths_re,
                                       self.exclude_paths_re))
     i = 0
     while len(frames) > i:
         if 'module' in frames[i] and not (
                 frames[i]['module'].startswith('elasticapm.')
                 or frames[i]['module'] == 'contextlib'):
             return frames[i:]
         i += 1
     return frames