feat: add optional anonymous usage telemetry#79
Merged
Conversation
Add a lightweight, opt-in-by-default telemetry ping that runs once per version on `oktsec run`. This helps us understand how oktsec is being used so we can prioritize the right features. What is collected: - oktsec version - OS and architecture (darwin/arm64, linux/amd64, etc.) - Aggregate counts: number of agents, rule overrides - Feature flags: gateway enabled, LLM layer enabled, mode What is NOT collected: - No IP addresses, hostnames, or usernames - No agent names, API keys, or configuration details - No message content or detection results The ping fires once per version (not per run) and silently fails if the endpoint is unreachable. Opt out anytime: export OKTSEC_NO_TELEMETRY=1 or touch ~/.oktsec/.no-telemetry The implementation is 60 lines of Go with 4 tests. Source code is public and auditable at internal/telemetry/ping.go. Ref: https://oktsec.com/telemetry
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
Adds a lightweight telemetry ping that helps us understand how oktsec is being used so we can prioritize the right platform support, features, and documentation.
The ping runs once per version on
oktsec run. It sends a single HEAD request with anonymous, non-identifying data. It silently does nothing if the endpoint is unreachable.What is collected
What is NOT collected
No IP addresses, hostnames, usernames, agent names, API keys, message content, detection results, or any configuration details. The full list of fields is above. There is nothing else.
How to opt out
Implementation
internal/telemetry/ping.go(60 lines)internal/telemetry/ping_test.go(4 tests)oktsec run --helpTest plan
make build && make test && make lint && make vetRef: follows the same pattern as Next.js telemetry and Homebrew analytics