-
Notifications
You must be signed in to change notification settings - Fork 886
feat: Add anonymized telemetry to report product usage #2273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This adds a background service to report telemetry to a Coder server for usage data. There will be realtime event data sent in the future, but for now usage will report on a CRON.
@@ -0,0 +1,4 @@ | |||
CREATE TABLE IF NOT EXISTS site_config ( | |||
key varchar(256) NOT NULL UNIQUE, | |||
value varchar(8192) NOT NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using jsonb
as the value would make it much easier in the future to do migrations on structured data. We've needed to do this a couple times in v1.
coderd/telemetry/telemetry.go
Outdated
emailHashed := "" | ||
atSymbol := strings.LastIndex(dbUser.Email, "@") | ||
if atSymbol >= 0 { | ||
hash := sha256.Sum256([]byte(dbUser.Email[:atSymbol])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hash seems easily reversible tbh. What if we just used {user_id}@domain.com
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want it to be traceable across deployments. We could use a greater hash, but I agree it's still crackable regardless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, I forgot about that. This seems reasonable then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a comment here for that
ad19dce
to
b7b0833
Compare
79f5490
to
8b1eef8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
af8190a
to
61f6c6f
Compare
fbc9edf
to
c333174
Compare
This adds a background service to report telemetry to a Coder
server for usage data. There will be realtime event data sent
in the future, but for now usage will report on a CRON.