-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Handle blocked telemetry better #8328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
- Add CONTINUE_TELEMETRY_ENABLED env var to control both PostHog and OpenTelemetry telemetry - Maintain backward compatibility with existing CONTINUE_ALLOW_ANONYMOUS_TELEMETRY and CONTINUE_CLI_ENABLE_TELEMETRY variables - Update warning message to reference the new unified variable Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 3 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="extensions/cli/src/telemetry/telemetryService.ts">
<violation number="1" location="extensions/cli/src/telemetry/telemetryService.ts:83">
CONTINUE_TELEMETRY_ENABLED="false" still enables telemetry because the code falls back to the legacy flag instead of honoring the new value.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
telemetryEnabled = true; | ||
} else { | ||
// Fall back to legacy variable for backward compatibility | ||
telemetryEnabled = process.env.CONTINUE_CLI_ENABLE_TELEMETRY !== "0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CONTINUE_TELEMETRY_ENABLED="false" still enables telemetry because the code falls back to the legacy flag instead of honoring the new value.
Prompt for AI agents
Address the following comment on extensions/cli/src/telemetry/telemetryService.ts at line 83:
<comment>CONTINUE_TELEMETRY_ENABLED="false" still enables telemetry because the code falls back to the legacy flag instead of honoring the new value.</comment>
<file context>
@@ -71,8 +71,19 @@ class TelemetryService {
+ telemetryEnabled = true;
+ } else {
+ // Fall back to legacy variable for backward compatibility
+ telemetryEnabled = process.env.CONTINUE_CLI_ENABLE_TELEMETRY !== "0";
+ }
+
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Fall back to the legacy variable for backward compatibility
@rossigee we recently split CONTINUE_ALLOW_ANONYMOUS_TELEMETRY and CONTINUE_CLI_ENABLE_TELEMETRY intentionally, because they needed to be independently configurable
CONTINUE_CLI_ENABLE_TELEMETRY is for OTEL, CONTINUE_ALLOW_ANONYMOUS_TELEMETRY is for posthog. Could you clarify reasons to merge? I think the no internet updates would be great
Improve telemetry handling in Continue CLI
Description
When running the CLI in a network that can't reach the telemetry endpoints, it produces lots of DNS/network related stacktraces during operation.
This PR enhances the telemetry system in the Continue CLI by addressing issues with blocked telemetry and providing unified control over telemetry settings.
Changes Made
1. Handle Blocked Telemetry Detection
app.posthog.com
to detect when telemetry is blocked by network configurations0.0.0.0
,127.x.x.x
)CONTINUE_TELEMETRY_ENABLED=0
2. Unified Telemetry Control
CONTINUE_TELEMETRY_ENABLED
environment variable to control both PostHog and OpenTelemetry telemetryCONTINUE_ALLOW_ANONYMOUS_TELEMETRY
(PostHog)CONTINUE_CLI_ENABLE_TELEMETRY
(OpenTelemetry)Motivation
Testing
Breaking Changes
None - all changes are backward compatible.
Summary by cubic
Improve telemetry handling in the Continue CLI to avoid noisy DNS/network errors when telemetry is blocked, and add a single env var to control all telemetry.