// -*- mode: Rust -*-
// AUTOGENERATED BY glean_parser v22.0.1. DO NOT EDIT. DO NOT COMMIT.
/* 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
pub mod remote_settings {
#[allow(unused_imports)] // HistogramType might be unusued, let's avoid warnings
use glean_sym::{metrics::*, types::*};
#[derive(Default, Debug, Clone, Hash, Eq, PartialEq)]
pub struct UptakeRemotesettingsExtra {
pub age: Option<String>,
pub duration: Option<String>,
pub errorname: Option<String>,
pub source: Option<String>,
pub timestamp: Option<String>,
pub trigger: Option<String>,
pub value: Option<String>,
}
impl ExtraKeys for UptakeRemotesettingsExtra {
const ALLOWED_KEYS: &'static [&'static str] = &["age", "duration", "errorName", "source", "timestamp", "trigger", "value"];
fn into_ffi_extra(self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
let mut map = ::std::collections::HashMap::new();
self.age.and_then(|val| map.insert("age".to_string(), val.to_string()));
self.duration.and_then(|val| map.insert("duration".to_string(), val.to_string()));
self.errorname.and_then(|val| map.insert("errorName".to_string(), val.to_string()));
self.source.and_then(|val| map.insert("source".to_string(), val.to_string()));
self.timestamp.and_then(|val| map.insert("timestamp".to_string(), val.to_string()));
self.trigger.and_then(|val| map.insert("trigger".to_string(), val.to_string()));
self.value.and_then(|val| map.insert("value".to_string(), val.to_string()));
map
}
}
#[allow(non_upper_case_globals, dead_code)]
/// generated from remote_settings.uptake_remotesettings
///
/// Was the remote content successfully pulled? This uptake telemetry allows to
/// monitor the behaviour of our clients when it comes to fetching data from remote
/// main/rev/1427c8863/services/common/metrics.yaml
pub static uptake_remotesettings: ::glean_sym::__export::Lazy<EventMetric<UptakeRemotesettingsExtra>> = ::glean_sym::__export::Lazy::new(|| {
let meta =
CommonMetricData {
category: "remote_settings".into(),
name: "uptake_remotesettings".into(),
send_in_pings: vec!["events".into()],
lifetime: Lifetime::Ping,
disabled: true,
..Default::default()
};
EventMetric::new(meta)
});
}