Skip to content

feat: forward warn-level logs to Sentry #194

Open

Description

@blimmer

What's the problem?

Today only logs at level error (and above) are forwarded to Sentry by @contextbridge/instrumentation. Warnings — which often indicate degraded behavior or conditions that precede a real error — stay local in stderr and never reach Sentry. As a result, we lose early signals about issues users hit in real usage and can only react after something has hard-failed.

Proposed solution

Lower the pino → Sentry capture threshold so warn-level logs are also reported, mapped to Sentry's warning severity so they remain filterable and don't drown out true errors.

Additional context

ContextBridge is a local-first tool, so telemetry sensitivity matters. Prior discussion concluded that warn-level reporting is acceptable in principle, but the rollout should:

  • Audit existing logger.warn(...) call sites to confirm no user-supplied content (file paths, markdown bodies, plan text, etc.) is attached to the structured log object.
  • Establish a convention for future warn-level logs so the same payload-hygiene rule applies going forward.

Activity

  1. added
    enhancement
    on May 20, 2026
  2. changed the title [-]Start sending warn logs to Sentry[/-] [+]feat: forward warn-level logs to Sentry[/+] on May 20, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions