Conversation
Removes all telemetry from bd: - internal/metrics (anonymous usage metrics via dolthub/eventkit): per-command cli_command events, the event queue under $HOME/.beads/eventsData, the detached `bd send-metrics` uploader, and the https://gastownhall-eventsapi.com/mp/collect endpoint. - `bd metrics` / `bd metrics on|off` / `bd metrics example` commands and their docs (docs/cli-reference/metrics.md, CLI_REFERENCE.md entries). - metrics.* config defaults and user-global plumbing (MetricsDisabledByUserConfig, UserMetricsEndpoint, MetricsNoticeShownByUserConfig); BD_DISABLE_METRICS / BD_DISABLE_EVENT_FLUSH / DO_NOT_TRACK test-harness vars removed as dead. - OTel command-span wiring: cmd/bd/command_telemetry.go (initTelemetry, startCommandSpan), the commandSpan lifecycle in main.go, and the telemetry-only argv scrubbers (secretFlagTokens, scrubArgsForTelemetry, telemetry_redact.go). telemetry.Init now has no callers, so the instrumented storage decorators in internal/telemetry are permanently no-op; BD_OTEL_* no longer activates anything. - docs/reference/observability.md (documented the removed OTel export). - github.com/dolthub/eventkit dropped from go.mod via go mod tidy. Tests: `go build ./...` and `go vet ./...` clean; targeted unit tests pass (internal/config user-global authority tests rewritten around node_id; cmd/bd config-show provenance test rewritten around node_id; storage-decorator wiring tests pass). Full integration suite not run. Fixes: bd no longer phones home anywhere. `bd metrics` is gone; there is nothing to opt out of.
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
Removes all telemetry from
bd: the anonymous usage-metrics pipeline (internal/metrics+dolthub/eventkit, per-commandcli_commandevents, the$HOME/.beads/eventsDataqueue, the detachedbd send-metricsuploader posting togastownhall-eventsapi.com) and the OpenTelemetry command-span wiring (command_telemetry.go,initTelemetry/startCommandSpan, the telemetry-only argv scrubbers).What changed
internal/metrics/(event queue, flusher, spawn, machine-id, user-config),cmd/bd/metrics.go,cmd/bd/send_metrics.go,cmd/bd/command_telemetry.go,cmd/bd/telemetry_redact.go, and their tests.cmd/bd/main.go: usage-metrics bootstrap,send-metricshandling,metricsno-DB command entry, first-run notice,CloseAndFlush, OTel init/span/shutdown,commandSpanstate,secretFlagTokens/scrubArgsForTelemetryand the DSN-scrub family (telemetry-only).metrics.disabled/metrics.endpointdefaults and theMetricsDisabledByUserConfig/UserMetricsEndpoint/MetricsNoticeShownByUserConfigplumbing;metrics.dropped from recognized prefixes. User-global mechanism itself kept (node_idstill uses it).BD_DISABLE_METRICS/BD_DISABLE_EVENT_FLUSH/DO_NOT_TRACKharness vars (now dead); rewrote the user-global provenance/authority tests aroundnode_id; kept the no-telemetry-residue guards (eventsDatamust not appear under isolated HOME).docs/cli-reference/metrics.mdanddocs/reference/observability.md; removedbd metricsfromCLI_REFERENCE.md, cli-reference index, and docs nav.go.mod:github.com/dolthub/eventkitremoved viago mod tidy.Notes for reviewers
internal/telemetry/(instrumented storage decorators) is intentionally kept:telemetry.Initnow has zero callers, so it is permanently no-op, and the decorators are load-bearing types for the storage chain.BD_OTEL_ENABLEDno longer activates anything.cmd/bd/doctor/perf_dolt.go's localDoltPerfMetricsvariable is unrelated performance reporting, untouched.Validation
go build ./...— cleango vet ./...— cleaninternal/configuser-global authority tests,cmd/bdconfig-show provenance test, storage-decorator wiring tests