Add anonymous phone-home telemetry via CronJob#424
Closed
axon-agent[bot] wants to merge 2 commits intomainfrom
Closed
Add anonymous phone-home telemetry via CronJob#424axon-agent[bot] wants to merge 2 commits intomainfrom
axon-agent[bot] wants to merge 2 commits intomainfrom
Conversation
Add a daily CronJob that collects anonymous aggregate usage data (task counts by type/phase, feature adoption, cost/token totals) and sends it to a telemetry endpoint. The CronJob reuses the existing controller image with a --telemetry-report flag that switches to one-shot mode. Operators can opt out by deleting the CronJob. No PII is collected. Closes #390 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
2 issues found across 6 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/manifests/install.yaml">
<violation number="1" location="internal/manifests/install.yaml:314">
P2: The telemetry CronJob runs under the controller ServiceAccount, which has broad write privileges (secrets, deployments, tasks). For least-privilege, use a dedicated ServiceAccount/Role with only the read permissions telemetry needs.</violation>
</file>
<file name="internal/telemetry/telemetry.go">
<violation number="1" location="internal/telemetry/telemetry.go:297">
P2: Handle a possible AlreadyExists race when creating the telemetry ConfigMap; otherwise concurrent runs can fail even though the ConfigMap was created by another instance.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| backoffLimit: 3 | ||
| template: | ||
| spec: | ||
| serviceAccountName: axon-controller |
There was a problem hiding this comment.
P2: The telemetry CronJob runs under the controller ServiceAccount, which has broad write privileges (secrets, deployments, tasks). For least-privilege, use a dedicated ServiceAccount/Role with only the read permissions telemetry needs.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At internal/manifests/install.yaml, line 314:
<comment>The telemetry CronJob runs under the controller ServiceAccount, which has broad write privileges (secrets, deployments, tasks). For least-privilege, use a dedicated ServiceAccount/Role with only the read permissions telemetry needs.</comment>
<file context>
@@ -292,3 +292,41 @@ spec:
+ backoffLimit: 3
+ template:
+ spec:
+ serviceAccountName: axon-controller
+ restartPolicy: OnFailure
+ containers:
</file context>
- Include version in User-Agent header for server-side observability - Restructure getOrCreateInstallationID with switch/case for clearer control flow 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
internal/telemetrypackage with anonymous aggregate data collection and HTTP reporting--telemetry-reportand--telemetry-endpointflags to the controller binary for one-shot telemetry modeaxon-telemetry) toinstall.yamlthat runs the controller in one-shot modeData collected (all anonymous aggregates, no PII):
Opt-out: Delete the CronJob (
kubectl delete cronjob axon-telemetry -n axon-system) or remove it frominstall.yamlbefore applying.Closes #390
Test plan
make verifypassesmake testpasses (including new telemetry unit tests)--telemetry-report --telemetry-endpoint=http://localhost:8888against a local cluster🤖 Generated with Claude Code
Summary by cubic
Adds a daily CronJob that runs the controller in one-shot mode to send anonymous aggregate telemetry, addressing #390. Helps track feature adoption and scale without collecting PII.
New Features
Migration
Written for commit 90f8b2b. Summary will update on new commits.