Skip to content

Conversation

@continue
Copy link
Contributor

@continue continue bot commented Oct 7, 2025

Summary

This PR decouples OpenTelemetry (OTEL) metrics from the CONTINUE_CLI_ENABLE_TELEMETRY environment variable in the Continue CLI.

Context

From Slack discussion: https://continuedev.slack.com/archives/C096032ATNG/p1759420638004449?thread_ts=1759420638.004449&cid=C096032ATNG

OTEL is already opt-in because users must explicitly add destination info (e.g., OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_METRICS_EXPORTER). The CONTINUE_CLI_ENABLE_TELEMETRY environment variable should only control anonymous telemetry (PostHog), not OTEL.

Changes

  • telemetryService.ts: Removed the check for CONTINUE_CLI_ENABLE_TELEMETRY from OTEL initialization
  • otlp-metrics.md: Removed CONTINUE_CLI_ENABLE_TELEMETRY from the OTEL configuration documentation
  • Added clarifying comment in code explaining that OTEL is opt-in via configuration

Behavior

Before

  • OTEL was disabled if CONTINUE_CLI_ENABLE_TELEMETRY=0, even if OTEL config was present
  • This made OTEL unusable for users who wanted to opt-out of anonymous telemetry but still use OTEL

After

  • OTEL is enabled solely by the presence of OTEL configuration variables
  • CONTINUE_CLI_ENABLE_TELEMETRY now only affects PostHog anonymous telemetry
  • Users can independently control OTEL and anonymous telemetry

Testing

Existing tests should continue to pass as they already set OTEL_METRICS_EXPORTER which is the actual control for OTEL.


This agent session was co-authored by tingwai and Continue.


Summary by cubic

Decoupled OTEL metrics from CONTINUE_CLI_ENABLE_TELEMETRY so OTEL is controlled only by OTEL env vars. This lets users disable anonymous telemetry while still using OTEL (aligns with CON-4291).

  • Bug Fixes
    • Removed CONTINUE_CLI_ENABLE_TELEMETRY check from OTEL initialization; OTEL now enables when OTEL config is present.
    • Updated docs to drop CONTINUE_CLI_ENABLE_TELEMETRY from OTEL setup and clarified it only controls PostHog.

@TyDunn TyDunn marked this pull request as ready for review October 7, 2025 19:56
@TyDunn TyDunn requested a review from a team as a code owner October 7, 2025 19:56
@TyDunn TyDunn requested review from tingwai and removed request for a team October 7, 2025 19:56
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 7, 2025
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

⚠️ PR Title Format

Your PR title doesn't follow the conventional commit format, but this won't block your PR from being merged. We recommend using this format for better project organization.

Expected Format:

<type>[optional scope]: <description>

Examples:

  • feat: add changelog generation support
  • fix: resolve login redirect issue
  • docs: update README with new instructions
  • chore: update dependencies

Valid Types:

feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

This helps with:

  • 📝 Automatic changelog generation
  • 🚀 Automated semantic versioning
  • 📊 Better project history tracking

This is a non-blocking warning - your PR can still be merged without fixing this.

…y control

Separates control of OTEL telemetry and anonymous PostHog telemetry:
- CONTINUE_CLI_ENABLE_TELEMETRY: Controls OTEL telemetry (requires OTEL config)
- CONTINUE_ALLOW_ANONYMOUS_TELEMETRY: Controls anonymous PostHog telemetry

This allows users to independently control:
1. OTEL metrics (opt-in via config + env var)
2. Anonymous telemetry (opt-out via env var)

Changes:
- Added CONTINUE_ALLOW_ANONYMOUS_TELEMETRY env var
- Updated posthogService to use new env var
- Kept CONTINUE_CLI_ENABLE_TELEMETRY for OTEL control
- Updated documentation for both telemetry types
- Updated all tests to reflect the change

Generated with [Continue](https://continue.dev)

Co-authored-by: tingwai <tingwai@continue.dev>
@continue continue bot force-pushed the continue/con-4291 branch from f48e121 to 73057d3 Compare October 7, 2025 20:03
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@TyDunn TyDunn changed the title Decouple OTEL from CONTINUE_CLI_ENABLE_TELEMETRY environment variable Decouple anonymous telemetry from CONTINUE_CLI_ENABLE_TELEMETRY environment variable Oct 7, 2025

get isEnabled() {
return process.env.CONTINUE_CLI_ENABLE_TELEMETRY !== "0";
return process.env.CONTINUE_ALLOW_ANONYMOUS_TELEMETRY !== "0";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't right, its changing the flag name for enabling posthog telemetry. We should be changing the flag name for wherever OTEL is enabled

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 10, 2025
@TyDunn TyDunn requested a review from tingwai October 10, 2025 18:47
@tingwai tingwai merged commit b8677b2 into main Oct 13, 2025
80 of 85 checks passed
@tingwai tingwai deleted the continue/con-4291 branch October 13, 2025 18:38
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 13, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 13, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 14, 2025

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.25.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants