Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Fix I think
Browse files Browse the repository at this point in the history
  • Loading branch information
sblatz committed May 15, 2019
1 parent b201988 commit eafa55a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/metrics.yaml
Expand Up @@ -645,7 +645,7 @@ error_page:
bugs:
- 1242
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/2491
- https://github.com/mozilla-mobile/fenix/pull/2491#issuecomment-492414486
notification_emails:
- fenix-core@mozilla.com
expires: "2020-03-01"
Expand Up @@ -22,6 +22,7 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import org.mozilla.fenix.GleanMetrics.ErrorPage

private class EventWrapper<T : Enum<T>>(
private val recorder: ((Map<T, String>?) -> Unit),
Expand Down Expand Up @@ -158,6 +159,10 @@ private val Event.wrapper
is Event.UriOpened -> EventWrapper<NoExtraKeys>(
{ Events.totalUriCount.add(1) }
)
is Event.ErrorPageVisited -> EventWrapper(
{ ErrorPage.visitedError },
{ ErrorPage.visitedErrorKeys.valueOf(it) }
)

// Don't track other events with Glean
else -> null
Expand Down

0 comments on commit eafa55a

Please sign in to comment.