Merged
Conversation
Sends command name, subcommand, duration, success/error, OS, arch, CLI version, and CI flag to the Railway API after each invocation. Silently skipped when unauthenticated, on network failure, or when the user opts out via DO_NOT_TRACK=1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pull updated schema with cliEventTrack mutation and replace the raw JSON POST with typed codegen via graphql_client, matching the rest of the codebase. Also adds DNS_RECORD_TYPE_TXT from the schema update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows a notice to stderr informing users about CLI usage data collection, with DO_NOT_TRACK=1 opt-out. Persisted to ~/.railway/notices.json so it only displays once. Suppressed in CI/non-TTY and when telemetry is already disabled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds RAILWAY_NO_TELEMETRY=1 as a Railway-specific alternative to DO_NOT_TRACK=1 for disabling CLI telemetry. Updates the notice text to mention both variables. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
coffee-cup
approved these changes
Feb 12, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cliEventTrackGraphQL mutation after each CLI invocationDO_NOT_TRACK=1(follows consoledonottrack.com convention)schema.jsonwith latest from the APIFiles changed
src/telemetry.rsCliTrackEventstruct and asyncsend()functionsrc/main.rsmod telemetry;declarationsrc/macros.rssrc/gql/mutations/strings/CliEventTrack.graphqlsrc/gql/mutations/mod.rsCliEventTrackstruct, addDNS_RECORD_TYPE_TXTvariant from schema updatesrc/gql/schema.jsonDesign decisions
graphql_clientcodegen — usespost_graphql::<mutations::CliEventTrack, _>(), matching the rest of the codebasetokio::time::timeoutprevents stalling on exitgraphql_client,reqwest(viaGQLClient), andtokioTest plan
cargo buildcompiles cleanlycargo test— all 106 tests passcargo clippy— no new warningsRUST_LOG=reqwest=debug cargo run -- whoami— confirm telemetry POST firesDO_NOT_TRACK=1 cargo run -- whoami— confirm no telemetry POSTcargo run -- link(interactive) — confirm telemetry fires after prompt completioncargo run -- login(unauthenticated) — confirm no crash, telemetry silently skipped