Generated file

Copy as Markdown

Other Tools

// -*- mode: C++ -*-
// 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_GleanCrashesMetrics_h
#define mozilla_GleanCrashesMetrics_h
#include "mozilla/glean/bindings/MetricTypes.h"
namespace mozilla::glean {
namespace crash {
/**
* generated from crash.compressed_store_size
* Size (in bytes) of the compressed crash store JSON file.
* This metric was generated to correspond to the Legacy Telemetry exponential histogram CRASH_STORE_COMPRESSED_BYTES.
*/
constexpr impl::MemoryDistributionMetric compressed_store_size(4886);
/**
* generated from crash.submit_attempt
*/
enum class SubmitAttemptLabel: uint16_t {
eMainCrash = 0,
eMainHang = 1,
eContentCrash = 2,
eContentHang = 3,
ePluginCrash = 4,
ePluginHang = 5,
eGmpluginCrash = 6,
eGmpluginHang = 7,
eGpuCrash = 8,
eGpuHang = 9,
eVrCrash = 10,
eVrHang = 11,
eRddCrash = 12,
eRddHang = 13,
eSocketCrash = 14,
eSocketHang = 15,
eUtilityCrash = 16,
eUtilityHang = 17,
eSandboxbrokerCrash = 18,
eSandboxbrokerHang = 19,
eForkserverCrash = 20,
eForkserverHang = 21,
e__Other__,
};
/**
* An attempt to submit a crash. Keyed on the CrashManager Crash.type.
* This metric was generated to correspond to the Legacy Telemetry count histogram PROCESS_CRASH_SUBMIT_ATTEMPT.
*/
constexpr impl::Labeled<impl::CounterMetric<impl::CounterType::eBaseOrLabeled>, SubmitAttemptLabel> submit_attempt(4887);
/**
* generated from crash.submit_success
* The submission status when main/plugin/content crashes are submitted. 1 is success, 0 is failure. Keyed on the CrashManager Crash.type.
* This metric was generated to correspond to the Legacy Telemetry boolean histogram PROCESS_CRASH_SUBMIT_SUCCESS.
*/
constexpr impl::DualLabeledCounterMetric submit_success(4888);
}
namespace crash_submission {
/**
* generated from crash_submission.channel_status
* Collecting XHR channel status on error code when statusCode == 0.
*/
constexpr impl::Labeled<impl::CounterMetric<impl::CounterType::eBaseOrLabeled>, DynamicLabel> channel_status(4889);
/**
* generated from crash_submission.collector_errors
* Amount and error name reported when performing crash submission.
*/
constexpr impl::Labeled<impl::CounterMetric<impl::CounterType::eBaseOrLabeled>, DynamicLabel> collector_errors(4890);
/**
* generated from crash_submission.failure
* Number of failed crash report submissions
*/
constexpr impl::CounterMetric<impl::CounterType::eBaseOrLabeled> failure(4891);
/**
* generated from crash_submission.failure_event
*/
struct FailureEventExtra {
mozilla::Maybe<nsCString> id;
mozilla::Maybe<nsCString> reason;
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
nsTArray<nsCString> extraKeys;
nsTArray<nsCString> extraValues;
if (id) {
extraKeys.AppendElement()->AssignASCII("id");
extraValues.EmplaceBack(id.value());
}
if (reason) {
extraKeys.AppendElement()->AssignASCII("reason");
extraValues.EmplaceBack(reason.value());
}
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
}
};
/**
* A crash report failed to be submitted.
*/
constexpr impl::EventMetric<FailureEventExtra> failure_event(4892);
/**
* generated from crash_submission.pending
* Number of pending crash report submissions
*/
constexpr impl::CounterMetric<impl::CounterType::eBaseOrLabeled> pending(4893);
/**
* generated from crash_submission.success
* Number of successfull crash report submissions
*/
constexpr impl::CounterMetric<impl::CounterType::eBaseOrLabeled> success(4894);
}
} // namespace mozilla::glean
#endif // mozilla_GleanCrashesMetrics_h