Skip to content

Commit de559f6

Browse files
committed
Add auto disable to dev.js
1 parent ddeac6e commit de559f6

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/b2c-cli/bin/dev.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
66
*/
77

8+
// Disable telemetry in development mode to avoid polluting production data
9+
process.env.SFCC_DISABLE_TELEMETRY = process.env.SFCC_DISABLE_TELEMETRY || 'true';
10+
811
// Load .env file if present (Node.js native support)
912
try {
1013
process.loadEnvFile();

packages/b2c-dx-mcp/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ Storefront Next development tools for building modern storefronts.
222222

223223
The MCP server collects anonymous usage telemetry to help improve the developer experience. Telemetry is enabled by default.
224224

225+
**Development mode**: Telemetry is automatically disabled when using `bin/dev.js`, so local development and testing won't pollute production data.
226+
225227
### Disabling Telemetry
226228

227229
Set one of these environment variables to disable telemetry:

packages/b2c-dx-mcp/bin/dev.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
66
*/
77

8+
// Disable telemetry in development mode to avoid polluting production data
9+
process.env.SFCC_DISABLE_TELEMETRY = process.env.SFCC_DISABLE_TELEMETRY || 'true';
10+
811
// Load .env file if present (Node.js native support)
912
try {
1013
process.loadEnvFile();

0 commit comments

Comments
 (0)