You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
Also I've added a custom ping in the pings.yaml as below:
search-ping:
description: |
A ping to record search data.
include_client_id: false
bugs:
- https://github.com/mozilla-mobile/fenix/issues/12345678
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/12345678
notification_emails:
- [email protected]
I've added a file for searchPing as below:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.components.metrics
import androidx.annotation.VisibleForTesting
import kotlinx.coroutines.*
import org.mozilla.fenix.GleanMetrics.SearchMetric
import org.mozilla.fenix.GleanMetrics.Pings
class SearchPing {
/**
* Fills the metrics and triggers the 'search' ping.
*/
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
internal fun triggerPing(url: String) {
CoroutineScope(Dispatchers.IO).launch {
SearchMetric.query.set(url)
Pings.searchPing.submit()
}
}
/**
* Trigger sending the `search` ping.
*/
fun checkAndSend(url: String) {
triggerPing(url)
}
}
And I'm submitting the ping in the openSearchOrUrl method of SearchController class as follow:
private fun openSearchOrUrl(url: String) {
val searchPing = SearchPing()
searchPing.checkAndSend(url)
...
}
What is wrong with me?
I have the following results in the logcat first when performing a search and second when closing and opening app:
2020-08-17 13:23:43.172 19752-19799/org.mozilla I/libglean_ffi: glean_core::ping: Collecting search-ping
2020-08-17 13:23:43.189 19752-19799/org.mozilla D/libglean_ffi: glean_core::ping: Storing ping 'e7bd582c-28aa-4a59-bc7e-062b56fa5522' at '/data/user/0/org.mozilla/glean_data/pending_pings/e7bd582c-28aa-4a59-bc7e-062b56fa5522'
2020-08-17 13:23:43.191 19752-19799/org.mozilla I/libglean_ffi: glean_core: The ping 'search-ping' was submitted and will be sent as soon as possible
I don't think this is the right place to file this, the telemetry will go to Mozilla telemetry servers, and collecting search queries isn't an open bug in this repo.
I've added a custom metric in the metrics.yaml as below :
Also I've added a custom ping in the pings.yaml as below:
I've added a file for searchPing as below:
And I'm submitting the ping in the
openSearchOrUrl
method ofSearchController
class as follow:What is wrong with me?
I have the following results in the
logcat
first when performing a search and second when closing and opening app:┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: