Skip to content

Research lighter alternatives to consola in the CLI #1769

Closed

Description

@sentry-junior

consola is the largest third-party package that sentry __complete loads on every TAB press. The database modules log through src/lib/logger.ts, so the completion graph cannot drop it. Proposed by BYK on #1762: research lighter logging alternatives and replace consola if one fits.

  • In the dist/complete.cjs bundle from perf(cli): Give __complete its own light entry point #1762, consola is ~75 KB of ~320 KB minified output. The other packages are @sentry/search-syntax (~42 KB) and uuidv7 (~4.5 KB). The rest is CLI source.
  • require("consola") alone takes ~17 ms, and require("./dist/complete.cjs") takes ~30 ms in total. Both were measured on Node 22 in a dev sandbox, so they are rough numbers.
  • Current consumers: logger.ts (tags, levels, withTag) and the Sentry log forwarding in initSentry (attachSentryReporter(Sentry.createConsolaReporter())). Any replacement must keep that forwarding.
  • test/script/cli-startup.test.ts lists consola in COMPLETION_PACKAGES.

via @BYK.

--

View Session in Sentry

Activity

  1. linear-code commented on Oct 31, 2026

    @linear-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLISentry CLI and CLI documentationperformance

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions