getsentry / getsentry/sentry-javascript

Unify console instrumentation to a single integration

Offen
#17,702 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Meta: Breaking Task
Vorherrschende Sprache
TypeScript
Sterne
8.7k
Forks
1.8k
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
515

Beschreibung

### Description

Our console instrumentation is spread across different sdks and integrations, making for a confusing set up experience. We should try to unify this to be a single integration in the next major version of the SDK. This also allows us to look at enabling sending logs by default via console logs if `enableLogs` is set to `true`.

Our ideal end state is a single console integration that captures breadcrumbs by default, captures logs if `enableLogs` is set to `true`, and optionally captures errors if configured by users. This allows us to delete `captureConsoleIntegration`, and simplify `breadcrumbsIntegration` in browser (something we've wanted to do for a long time).

- `@sentry/core` - `consoleIntegraiton` (captures console as breadcrumbs): https://github.com/getsentry/sentry-javascript/blob/develop/packages/core/src/instrument/console.ts
- `@sentry/core` - `consoleLoggingIntegration` (captures console as logs): https://github.com/getsentry/sentry-javascript/blob/develop/packages/core/src/logs/console-integration.ts
- `@sentry/core` - `captureConsoleIntegration` (captures console as errors): https://github.com/getsentry/sentry-javascript/blob/develop/packages/core/src/integrations/captureconsole.ts
- `@sentry/browser` - `breadcrumbsIntegration` (captures console as breadcrumbs): https://github.com/getsentry/sentry-javascript/blob/develop/packages/browser/src/integrations/breadcrumbs.ts
- `@sentry/deno` - `denoIntegration` (captures console as breadcrumbs): https://github.com/getsentry/sentry-javascript/blob/develop/packages/deno/src/integrations/breadcrumbs.ts

the `instrumentConsole` utility: https://github.com/getsentry/sentry-javascript/blob/5df78df4a3c1419c33bf9cacc9899a22fa73c5c1/packages/utils/src/instrument.ts#L109

Previous: https://github.com/getsentry/sentry-javascript/issues/4532

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.