-
Notifications
You must be signed in to change notification settings - Fork 119
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: Sending configuration to mixpanel #1504
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Timestamp: 2021-01-20 16:44:37 |
I think we should not send statistics from developer environment (our, local, manual tests could spoil statistics). DIsabling for IT or UT is great but I think it won't be enough. Statistics should be only from official releases? |
On the second thought, it should be possible to filter |
we could make a flag and store it in FlankProperties 😃 |
I think the uuid opt out should also apply to mixpanel
|
test_runner/src/main/kotlin/ftl/analytics/SendUsageStatistics.kt
Outdated
Show resolved
Hide resolved
|
||
private val classesForStatistics = listOf(IArgs::class, AndroidArgs::class, IosArgs::class) | ||
|
||
private fun KClass<*>.ignoredMembersForStatistics() = findMembersWithAnnotation(IgnoreInStatistics::class) |
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.
please move below keysToRemove
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.
Changed thanks! 👍
private val classesForStatistics = listOf(IArgs::class, AndroidArgs::class, IosArgs::class) | ||
|
||
private fun KClass<*>.ignoredMembersForStatistics() = findMembersWithAnnotation(IgnoreInStatistics::class) | ||
private fun KClass<*>.anonymousMembersForStatistics() = findMembersWithAnnotation(AnonymizeInStatistics::class) |
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.
please move below keysToAnonymize
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.
Changed thanks! 👍
test_runner/src/main/kotlin/ftl/analytics/UsageStatisticsClient.kt
Outdated
Show resolved
Hide resolved
Please remeber to update |
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.
The implementation looks well! 👍 I have added a few suggestions but all related to one thing.
annotation class AnonymizeInStatistics | ||
|
||
internal val keysToRemove by lazy { | ||
classesForStatistics.map { it.ignoredMembersForStatistics() }.flatten() |
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.
classesForStatistics.map { it.ignoredMembersForStatistics() }.flatten() | |
classesForStatistics.map(findMembersWithAnnotation(IgnoreInStatistics::class)).flatten() |
classesForStatistics.map { it.ignoredMembersForStatistics() }.flatten() | ||
} | ||
|
||
private fun KClass<*>.ignoredMembersForStatistics() = findMembersWithAnnotation(IgnoreInStatistics::class) |
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.
private fun KClass<*>.ignoredMembersForStatistics() = findMembersWithAnnotation(IgnoreInStatistics::class) |
test_runner/src/main/kotlin/ftl/analytics/StatisticDataFilters.kt
Outdated
Show resolved
Hide resolved
test_runner/src/main/kotlin/ftl/analytics/StatisticDataFilters.kt
Outdated
Show resolved
Hide resolved
test_runner/src/main/kotlin/ftl/analytics/StatisticDataFilters.kt
Outdated
Show resolved
Hide resolved
…t.kt Co-authored-by: piotradamczyk5 <65554637+piotradamczyk5@users.noreply.github.com>
Co-authored-by: piotradamczyk5 <65554637+piotradamczyk5@users.noreply.github.com>
179e0aa
to
2e5f40b
Compare
475bcbf
to
5005b49
Compare
fd8fed7
to
c91227f
Compare
Fixes #1503
Test Plan
environment-variables
, paths to files anonymized (maybe something more?)Checklist