// AUTOGENERATED BY glean_parser. DO NOT EDIT.
/* 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
#ifndef mozilla_GleanServicesSettingsMetrics_h
#define mozilla_GleanServicesSettingsMetrics_h
#include "mozilla/glean/bindings/MetricTypes.h"
namespace mozilla::glean {
namespace uptake_remotecontent_result {
/**
* generated from uptake.remotecontent.result.uptake_remotesettings
*/
struct UptakeRemotesettingsExtra {
mozilla::Maybe<nsCString> age;
mozilla::Maybe<nsCString> duration;
mozilla::Maybe<nsCString> errorname;
mozilla::Maybe<nsCString> source;
mozilla::Maybe<nsCString> timestamp;
mozilla::Maybe<nsCString> trigger;
mozilla::Maybe<nsCString> value;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (age) {
extraKeys.AppendElement()->AssignASCII("age");
extraValues.EmplaceBack(age.value());
}
if (duration) {
extraKeys.AppendElement()->AssignASCII("duration");
extraValues.EmplaceBack(duration.value());
}
if (errorname) {
extraKeys.AppendElement()->AssignASCII("errorName");
extraValues.EmplaceBack(errorname.value());
}
if (source) {
extraKeys.AppendElement()->AssignASCII("source");
extraValues.EmplaceBack(source.value());
}
if (timestamp) {
extraKeys.AppendElement()->AssignASCII("timestamp");
extraValues.EmplaceBack(timestamp.value());
}
if (trigger) {
extraKeys.AppendElement()->AssignASCII("trigger");
extraValues.EmplaceBack(trigger.value());
}
if (value) {
extraKeys.AppendElement()->AssignASCII("value");
extraValues.EmplaceBack(value.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* 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 servers. This helps defect-detection and allow observation of the proportion of success among clients and sources, the distribution of error causes, and its evolution over time.
*/
constexpr impl::EventMetric<UptakeRemotesettingsExtra> uptake_remotesettings(4823);
}
} // namespace mozilla::glean
#endif // mozilla_GleanServicesSettingsMetrics_h