-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat(analytics): migrate to grafana cloud #792
Conversation
ga is deprecated implementation is super simple via a single http post request, all metrics are anonymized, behind a flag and turned on by default
|
||
class GrafanaCloud : UsageTracker { | ||
private val client = OkHttpClient() | ||
private val key = |
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 key will end up in our sources anyways, don't see any reason to make it harder to extract
append( | ||
events.map { event -> | ||
when (event) { | ||
is Event.Devices -> Metric(name = "testing.device", value = event.total, tags = tags) |
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.
number of devices used
events.map { event -> | ||
when (event) { | ||
is Event.Devices -> Metric(name = "testing.device", value = event.total, tags = tags) | ||
is Event.Executed -> Metric(name = "testing.duration", value = event.seconds, tags = tags) |
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.
total duration of tests
when (event) { | ||
is Event.Devices -> Metric(name = "testing.device", value = event.total, tags = tags) | ||
is Event.Executed -> Metric(name = "testing.duration", value = event.seconds, tags = tags) | ||
is Event.TestsTotal -> Metric(name = "testing.test", value = event.total, tags = tags) |
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.
number of tests before filtering
is Event.Devices -> Metric(name = "testing.device", value = event.total, tags = tags) | ||
is Event.Executed -> Metric(name = "testing.duration", value = event.seconds, tags = tags) | ||
is Event.TestsTotal -> Metric(name = "testing.test", value = event.total, tags = tags) | ||
is Event.TestsRun -> Metric(name = "testing.executed", value = event.value, tags = tags) |
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.
number of tests after filtering
Codecov Report
@@ Coverage Diff @@
## develop #792 +/- ##
=============================================
- Coverage 59.84% 59.24% -0.60%
Complexity 790 790
=============================================
Files 209 213 +4
Lines 4303 4380 +77
Branches 679 689 +10
=============================================
+ Hits 2575 2595 +20
- Misses 1412 1463 +51
- Partials 316 322 +6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@Malinskiy Codecov plugin in the PR is so annoying and distracts me from reviewing the code. Could you turn it off in the code page? |
@@ -15,7 +15,7 @@ class MarathonRunCommonOptions : OptionGroup() { | |||
.default(File("Marathonfile")) | |||
val analyticsTracking by option("--analyticsTracking", help="Enable anonymous analytics tracking") | |||
.convert { it.toBoolean() } | |||
.default(false) | |||
.default(true) |
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.
=)
reason: GA is deprecated
notes: implementation is super simple via a single HTTP post request. All metrics are anonymized, behind a flag and turned on by default