Skip to content

Analytics #2778

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

Merged
merged 20 commits into from
Oct 15, 2021
Merged

Analytics #2778

merged 20 commits into from
Oct 15, 2021

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Nov 30, 2020

Allow the embedder to provide an analytics instance, and send an analytics event about the resolution.

@sigurdm sigurdm requested a review from jonasfj November 30, 2020 14:48
@google-cla google-cla bot added the cla: yes label Nov 30, 2020
@@ -110,6 +111,8 @@ abstract class PubCommand extends Command<int> {
return _pubEmbeddableCommand ?? (runner as PubCommandRunner);
}

Analytics get analytics => _pubEmbeddableCommand?.analytics;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we make a _NullAnalytics and/or a _LoggingAnalytics implementation that just logs everything ping with log-level fine, I think that's useful for debugging, testing and whenever analytics is disabled.

package.name,
label: package.version.toString(),
value: 1,
parameters: {'kind': dependencyType},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what this looks like on google analytics?

I'm sure we can always do aggregations based on this using big query regardless, but it might be worth looking into.

Copy link
Contributor Author

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we make a _NullAnalytics and/or a _LoggingAnalytics implementation that just logs everything ping with log-level fine, I think that's useful for debugging, testing and whenever analytics is disabled.

I added fine logging to whenever we send analytics - this will be nice to have for user speculating what analytics are sent.

The embeeding_test has its own _LoggingAnalytics for testing.

@sigurdm sigurdm marked this pull request as ready for review August 31, 2021 12:22
@sigurdm sigurdm merged commit 35681b0 into dart-lang:master Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants