private void invokeCompletionWithTracing(@NotNull Project project,
                                           @NotNull Editor editor,
                                           int time,
                                           boolean hasModifiers,
                                           @NotNull Caret caret) {
    TraceKt.use(
      completionTracer.spanBuilder("invokeCompletion")
        .setAttribute("project", project.getName())
        .setAttribute("caretOffset", caret.hasSelection() ? caret.getSelectionStart() : caret.getOffset()),
      span -> {
        invokeCompletion(project, editor, time, hasModifiers, caret);
        return null;
      }
    );
  }
private void invokeCompletionWithTracing(@NotNull Project project,
                                           @NotNull Editor editor,
                                           int time,
                                           boolean hasModifiers,
                                           @NotNull Caret caret)