Skip to content

Commit e3fc9ee

Browse files
author
Luca Forstner
authored
fix: Don't show log message if telemetry is disabled (#267)
1 parent 4360395 commit e3fc9ee

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/bundler-plugin-core/src/plugins/telemetry.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ export function telemetryPlugin({
1818
return {
1919
name: "sentry-telemetry-plugin",
2020
buildStart() {
21-
void shouldSendTelemetry.then(() => {
22-
logger.info(
23-
"Sending error and performance telemetry data to Sentry. To disable telemetry, set `options.telemetry` to `false`."
24-
);
21+
void shouldSendTelemetry.then((willSendTelemetry) => {
22+
if (willSendTelemetry) {
23+
logger.info(
24+
"Sending error and performance telemetry data to Sentry. To disable telemetry, set `options.telemetry` to `false`."
25+
);
26+
}
2527
});
2628
pluginExecutionTransaction.startTimestamp = Date.now() / 1000;
2729
},

0 commit comments

Comments
 (0)