If the stacktrace originates within the elasticapm module, it will skip
        frames until some other module comes up.
199910
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,
    ):
        """"""
        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,
            )
        )
647944
def should_skip(app, what, name, obj, skip, options):
  
  if name in ["__doc__", "__module__", "__dict__", "__weakref__",
               "__abstractmethods__"
              ] or name.startswith("_abc_"):
    return True
  return False
651559
func stacktrace() []string {
	ret := make([]string, 0, 2)

	for skip := 2; skip < maxStackFrames; skip++ {
		_, file, line, ok := runtime.Caller(skip)
		if !ok {
			break
		}

		ret = append(ret, fmt.Sprintf("at %s:%d", stripDirectories(file, 1), line))
	}

	return ret
}
1141476
@Override
    public void printStackTrace(PrintWriter p) {
        if (wrapped == null) {
            p.println("none");
        } else {

            StackTraceElement[] stackElements = getStackTraceEliminatingDuplicateFrames();

            // format and print
            p.println(wrapped);
            for (int i = 0; i < stackElements.length; i++) {
                StackTraceElement stackTraceElement = stackElements[i];
                final String toString = printStackTraceElement(stackTraceElement);
                p.println("\t" + toString);
            }

            TruncatableThrowable cause = getCause();
            // We know the cause will be truncatable, so not much extra work to do here
            // There's a super-class method we could call, but it's private :(

            if (cause != null) {
                // Non-internationalised string in what we're trying to imitate
                if (cause.isIntermediateCausesStripped()) {
                    p.print("Caused by (repeated) ... : ");

                } else {
                    p.print(CAUSED_BY);
                }

                cause.printStackTrace(p);
            }

        }

    }
396615
def handle_debug_backtrace(self, call_id, payload):
        """"""
        frames = payload["frames"]
        fd, path = tempfile.mkstemp('.json', text=True, dir=self.tmp_diff_folder)
        tmpfile = os.fdopen(fd, 'w')

        tmpfile.write(json.dumps(frames, indent=2))
        opts = {'readonly': True, 'bufhidden': 'wipe',
                'buflisted': False, 'swapfile': False}
        self.editor.split_window(path, size=20, bufopts=opts)
        tmpfile.close()
992072
function prepareStack(stack) {
	let lines = stack.split('\n').slice(1)

	if (lines.length > 500) {
		// Stack too big, probably this is caused by stack overflow
		// Remove middle values
		let skipped = lines.length - 500,
			top = lines.slice(0, 250),
			bottom = lines.slice(-250)
		lines = top.concat('--- skipped ' + skipped + ' frames ---', bottom)
	}

	return lines.map(line => line.trim().replace(/^at /, '').replace(basePath, '.'))
}
873851
def on_stacktrace_request(self, py_db, request):
        '''
        
        '''
        # : :type stack_trace_arguments: StackTraceArguments
        stack_trace_arguments = request.arguments
        thread_id = stack_trace_arguments.threadId
        start_frame = stack_trace_arguments.startFrame
        levels = stack_trace_arguments.levels

        fmt = stack_trace_arguments.format
        if hasattr(fmt, 'to_dict'):
            fmt = fmt.to_dict()
        self.api.request_stack(py_db, request.seq, thread_id, fmt=fmt, start_frame=start_frame, levels=levels)
1193526
function stackChain() {
  this.extend = new TraceModifier();
  this.filter = new TraceModifier();
  this.format = new StackFormater();
  this.version = require('./package.json').version;
}
143556
function symbolicateChromeTrace(traceFile, context) {
  const contentJson = JSON.parse(fs.readFileSync(traceFile, 'utf8'));
  if (contentJson.stackFrames == null) {
    console.error('Unable to locate `stackFrames` section in trace.');
    process.exit(1);
  }
  console.log(
    'Processing ' + Object.keys(contentJson.stackFrames).length + ' frames',
  );
  Object.values(contentJson.stackFrames).forEach(function(entry) {
    let line;
    let column;

    // Function entrypoint line/column; used for symbolicating function name
    // with legacy source maps (or when --no-function-names is set).
    let funcLine;
    let funcColumn;

    if (entry.funcVirtAddr != null && entry.offset != null) {
      // Without debug information.
      const funcVirtAddr = parseInt(entry.funcVirtAddr, 10);
      const offsetInFunction = parseInt(entry.offset, 10);
      // Main bundle always use hard-coded line value 1.
      // TODO: support multiple bundle/module.
      line = 1;
      column = funcVirtAddr + offsetInFunction;
      funcLine = 1;
      funcColumn = funcVirtAddr;
    } else if (entry.line != null && entry.column != null) {
      // For hbc bundle with debug info, name field may already have source
      // information for the bundle; we still can use babel/metro/prepack
      // source map to symbolicate the bundle frame addresses further to its
      // original source code.
      line = entry.line;
      column = entry.column;

      funcLine = entry.funcLine;
      funcColumn = entry.funcColumn;
    } else {
      // Native frames.
      return;
    }

    // Symbolicate original file/line/column.
    const addressOriginal = getOriginalPositionDetailsFor(
      line,
      column,
      UNKNOWN_MODULE_IDS,
      context,
    );

    let frameName;
    if (addressOriginal.functionName) {
      frameName = addressOriginal.functionName;
    } else {
      frameName = entry.name;
      // Symbolicate function name.
      if (funcLine != null && funcColumn != null) {
        const funcOriginal = getOriginalPositionFor(
          funcLine,
          funcColumn,
          UNKNOWN_MODULE_IDS,
          context,
        );
        if (funcOriginal.name != null) {
          frameName = funcOriginal.name;
        }
      } else {
        // No function line/column info.
        console.warn(
          'Warning: no function prolog line/column info; name may be wrong',
        );
      }
    }

    // Output format is: funcName(file:line:column)
    const sourceLocation = `(${addressOriginal.source}:${
      addressOriginal.line
    }:${addressOriginal.column})`;
    entry.name = frameName + sourceLocation;
  });
  console.log('Writing to ' + traceFile);
  fs.writeFileSync(traceFile, JSON.stringify(contentJson));
}
439297
def _frames(traceback):
    '''
    
    '''
    frame = traceback
    while frame.tb_next:
      frame = frame.tb_next
      yield frame.tb_frame
    return
281131
function tasync_trace_end(args, index) {
        Future.call(this);

        this.caller = FRAME;
        this.position = ++FRAME.subframes;
        this.subframes = 0;

        if (TASYNC_TRACE_ENABLE) {
            this.trace = new Error();
        }

        this.args = args;
        this.index = index;
    }
136604
private void detectNestedInvocations(Method daoMethod) {
		if (!Config.IN_PRODUCTION && !daoMethod.getName().startsWith("read")) {
			StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
			for (StackTraceElement stackTraceElement : stackTraceElements) {
				if (daoMethod.getDeclaringClass().getName().equals(stackTraceElement.getClassName()) &&
						!daoMethod.getName().equals(stackTraceElement.getMethodName())) {
					throw new RuntimeException(Utils.
							formatMessage("Method {0}.{1}() was invoked from another method in the same "
							+ "class - {2}.{3}(). DAO implementations should avoid this as it causes objects to be "
							+ "indexed and cached twice per request.",
							daoMethod.getDeclaringClass().getSimpleName(), daoMethod.getName(),
							stackTraceElement.getClassName(), stackTraceElement.getMethodName()));
				}
			}
		}
	}
680525
def do_stacktrace(self) -> None:
        """"""
        frame = sys._current_frames()[self._event_loop_thread_id]
        traceback.print_stack(frame, file=self._sout)
232979
function parseStacktrace(e, scriptName) {
    var UNKNOWN_FUNCTION = '<unknown>';
    var node = /^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;
    var lines = e.stacktrace.split('\n');
    var stack = [];
    var parts;
    var element;

    for (var i = 0, j = lines.length; i < j; ++i) {
        if ((parts = node.exec(lines[i]))) {
            element = {
                'file': parts[2],
                'method': parts[1] || UNKNOWN_FUNCTION,
                'line': parts[2] === scriptName ? +parts[3] - scriptContentLineOffset : +parts[3],
                'column': parts[4] ? +parts[4] : null
            };
        } else {
            continue;
        }
        stack.push(element);
    }

    return stack;
}
317054
private void skip(boolean stopAtImport, boolean stopAtMemberDecl, boolean stopAtIdentifier, boolean stopAtStatement) {
         while (true) {
             switch (token.kind) {
                case SEMI:
                    nextToken();
                    return;
                case PUBLIC:
                case FINAL:
                case ABSTRACT:
                case MONKEYS_AT:
                case EOF:
                case CLASS:
                case INTERFACE:
                case ENUM:
                    return;
                case IMPORT:
                    if (stopAtImport)
                        return;
                    break;
                case LBRACE:
                case RBRACE:
                case PRIVATE:
                case PROTECTED:
                case STATIC:
                case TRANSIENT:
                case NATIVE:
                case VOLATILE:
                case SYNCHRONIZED:
                case STRICTFP:
                case LT:
                case BYTE:
                case SHORT:
                case CHAR:
                case INT:
                case LONG:
                case FLOAT:
                case DOUBLE:
                case BOOLEAN:
                case VOID:
                    if (stopAtMemberDecl)
                        return;
                    break;
                case UNDERSCORE:
                case IDENTIFIER:
                   if (stopAtIdentifier)
                        return;
                    break;
                case CASE:
                case DEFAULT:
                case IF:
                case FOR:
                case WHILE:
                case DO:
                case TRY:
                case SWITCH:
                case RETURN:
                case THROW:
                case BREAK:
                case CONTINUE:
                case ELSE:
                case FINALLY:
                case CATCH:
                    if (stopAtStatement)
                        return;
                    break;
            }
            nextToken();
        }
    }
298101
private void writeFrame(JsonGenerator generator, SentryStackTraceElement stackTraceElement,
                            boolean commonWithEnclosing) throws IOException {
        generator.writeStartObject();
        generator.writeStringField(FILENAME_PARAMETER, stackTraceElement.getFileName());
        generator.writeStringField(MODULE_PARAMETER, stackTraceElement.getModule());
        boolean inApp = !(removeCommonFramesWithEnclosing && commonWithEnclosing) && isFrameInApp(stackTraceElement);
        generator.writeBooleanField(IN_APP_PARAMETER, inApp);
        generator.writeStringField(FUNCTION_PARAMETER, stackTraceElement.getFunction());
        generator.writeNumberField(LINE_NO_PARAMETER, stackTraceElement.getLineno());

        // Non-standard fields.
        if (stackTraceElement.getColno() != null) {
            generator.writeNumberField(COL_NO_PARAMETER, stackTraceElement.getColno());
        }

        if (stackTraceElement.getPlatform() != null) {
            generator.writeStringField(PLATFORM_PARAMTER, stackTraceElement.getPlatform());
        }

        if (stackTraceElement.getAbsPath() != null) {
            generator.writeStringField(ABSOLUTE_PATH_PARAMETER, stackTraceElement.getAbsPath());
        }

        if (stackTraceElement.getLocals() != null && !stackTraceElement.getLocals().isEmpty()) {
            generator.writeObjectFieldStart(VARIABLES_PARAMETER);
            for (Map.Entry<String, Object> varEntry : stackTraceElement.getLocals().entrySet()) {
                generator.writeFieldName(varEntry.getKey());
                generator.writeObject(varEntry.getValue());
            }
            generator.writeEndObject();
        }

        generator.writeEndObject();
    }
1101478
function() {
      var csr = new tr.ClockSyncRecord('ftrace_importer', 0, {});
      this.model_.clockSyncRecords.push(csr);
      if (this.stackFrameEvents_) {
        this.importStackFrames_(
            this.stackFrameEvents_, 'g', false /* addRootFrame */);
      }

      if (this.traceAnnotations_)
        this.importAnnotations_();

      var events = this.events_;
      for (var eI = 0; eI < events.length; eI++) {
        var event = events[eI];
        if (event.args === '__stripped__') {
          event.argsStripped = true;
          event.args = undefined;
        }

        if (event.ph === 'B' || event.ph === 'E') {
          this.processDurationEvent(event);

        } else if (event.ph === 'X') {
          var slice = this.processCompleteEvent(event);
          // TODO(yuhaoz): If Chrome supports creating other events with flow,
          // we will need to call processFlowEvent for them also.
          // https://github.com/catapult-project/catapult/issues/1259
          if (slice !== undefined && event.bind_id !== undefined)
            this.processFlowEvent(event, slice);

        } else if (event.ph === 'b' || event.ph === 'e' || event.ph === 'n' ||
                   event.ph === 'S' || event.ph === 'F' || event.ph === 'T' ||
                   event.ph === 'p') {
          this.processAsyncEvent(event);

        // Note, I is historic. The instant event marker got changed, but we
        // want to support loading old trace files so we have both I and i.
        } else if (event.ph === 'I' || event.ph === 'i' || event.ph === 'R') {
          this.processInstantEvent(event);

        } else if (event.ph === 'P') {
          this.processTraceSampleEvent(event);

        } else if (event.ph === 'C') {
          this.processCounterEvent(event);

        } else if (event.ph === 'M') {
          this.processMetadataEvent(event);

        } else if (event.ph === 'N' || event.ph === 'D' || event.ph === 'O') {
          this.processObjectEvent(event);

        } else if (event.ph === 's' || event.ph === 't' || event.ph === 'f') {
          this.processFlowEvent(event);

        } else if (event.ph === 'v') {
          this.processMemoryDumpEvent(event);

        } else {
          this.model_.importWarning({
            type: 'parse_error',
            message: 'Unrecognized event phase: ' +
                event.ph + ' (' + event.name + ')'
          });
        }
      }

      // Remove all the root stack frame children as they should
      // already be added.
      tr.b.iterItems(this.v8ProcessRootStackFrame_, function(name, frame) {
        frame.removeAllChildren();
      });
    }