getsentry / getsentry/sentry-javascript

Unify console instrumentation to a single integration

Đang mở
#17,702 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Meta: Breaking Task
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.