-
Notifications
You must be signed in to change notification settings - Fork 105
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
(PDK-1342) Submit PDK analytics events #668
Conversation
6a430ab
to
6ae5be8
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.
Looking good! I'm excited to start seeing this data come through!
I mostly just have some comments and questions although I did spot at least one thing that seemed like a bug with the .sync.yml
customization reporting.
end | ||
|
||
context 'and provided no flags' do | ||
after(:each) do | ||
PDK::CLI.run(['convert']) | ||
end |
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.
Would these be better as subject
blocks?
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.
Not really, as the CLI run isn't the subject of the tests, it's just something that we have to do to trigger the logic being tested.
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 don't feel super strongly about the subject
thing but I do think this happening in the after
hook obfuscates things a bit.
OK, I think this implements analytics submission for all the items that we're interested in according to our spec.
Common values that are submitted for every analytics event:
package
orgem
)We submit a "screen view" for every successful CLI command invocation that records:
--puppet-version
and--pe-version
)PDK_*
environment variables and their values (if set)Invalid commands are submitted as a distinct analytics events with the arguments and option values redacted.
Whenever a template repo is used, we submit an event recording if the template is
default
orcustom
(n.b. we do not record the path to the template repo itself). Additionally, if the template repo being used is the default one, we submit events for each file rendered, recording if the file isunmanaged
,deleted
,customized
ordefault
(n.b. in the event of acustomized
file, we do not record what was changed, only that it was changed via.sync.yml
overrides).Given the concerns of GDPR compliance you note that we're very carefully and strictly testing the analytics calls to ensure that no unexpected data is accidentally passed in.