feat(v10/core)!: Enable logs by default - #23311
Conversation
size-limit report 📦
|
68b7ff1 to
c282a54
Compare
|
Do we ship now breaking changes into v10? |
|
@JPeer264 not as a principle no, but there was some push to get this out soon so we might wanna do this in a minor. I'll hold off merging until we confirm we wanna do this |
|
Technically it is a fix, since it should have never been shipped like that 🤔 |
|
|
||
| - **feat(v10/core)!: Enable logs by default ([#23311](https://github.com/getsentry/sentry-javascript/pull/23311))** | ||
|
|
||
| The `enableLogs` client option now defaults to `true`, so Sentry Logs work without any manual opt-in. Nothing is captured unless you call the `Sentry.logger.*` APIs or add a log-forwarding integration (such as `consoleLoggingIntegration`, `pinoIntegration`, or the winston transport), and you can set `enableLogs: false` to opt out entirely. |
There was a problem hiding this comment.
Maybe we should point out here that we're aware that we don't follow semantic versioning here.
Backport of: #22630
c282a54 to
aa30c92
Compare
Lms24
left a comment
There was a problem hiding this comment.
Let's not yet merge this please. I think we should talk about this again on Monday.
After talking about this again, we decided to move on with this change, given there is still a way to disable logging and our logging integrations are already telemetry-separated and not enabled by default.
For some context: My concern was negative feedback after the Python SDK shipped a very similar change though the situation for them was slightly different to ours: Enabling logs by default produced more logs than explicit sentry logger calls, as they already had integrations that emitted logs by default (convoluted with other telemetry). Shipping our change here is still behaviour breaking but we can justify it to an extent.
Backport of: #22630
Flips the
enableLogsclient option to default totrueso users get logs without opting in, matching howenableMetricsalready behaves. An explicitenableLogs: falseturns it back off. Unless a logging integration is added or an explicit logging API is called no logs are emitted.Main difference to the original PR is that on v10 node and node-core are still separate packages so we need a few changes in both. Also added a changelog entry since this is a behavioral change.
Docs also need updating.