// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Events to initiate and track uploading file to GCS using LogUploadTracker.
// The file is expected to be a zipped set of logs prepared by Support Tool.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package ash.reporting;
import "components/reporting/proto/synced/upload_tracker.proto";
message LogUploadEvent {
// Upload parameters to initiate and track the upload are attached when the
// event is posted.
optional .reporting.UploadSettings upload_settings = 1;
optional .reporting.UploadTracker upload_tracker = 2;
// DEPRECATED. This field is moved to RemoteCommandDetails.
optional int64 command_id = 3 [deprecated = true];
// DEPRECATED. This field is moved to RemoteCommandDetails.
optional string command_result_payload = 4 [deprecated = true];
oneof details {
// The details of the remote command that triggered the log upload.
RemoteCommandDetails remote_command_details = 5;
// The details of the critical device event that triggered the log upload.
TriggerEventDetails trigger_event_details = 6;
}
}
// The details of the FETCH_SUPPORT_PACKET remote command that has triggered the
// log upload.
message RemoteCommandDetails {
// Additional fields provided by the caller can be added here.
// The ID of the remote device command that triggered the log upload.
optional int64 command_id = 1;
// The optional result payload (as a JSON string) for the command that has
// triggered the log upload. For more details please see comments for
// FetchSupportPacketResultCode in
// components/policy/proto/device_management_backend.proto file.
optional string command_result_payload = 2;
}
// The event type that triggers event based log upload.
enum TriggerEventType {
TRIGGER_EVENT_TYPE_UNSPECIFIED = 0;
// The OS update failed.
OS_UPDATE_FAILED = 1;
// The device crashed. This is triggered on fatal kernel and embedded
// controller crashes.
FATAL_CRASH = 2;
}
// The event details for the event that triggered the event based log upload.
message TriggerEventDetails {
// The type of event that triggered the log upload.
optional TriggerEventType trigger_event_type = 1;
// The ID that's generated by the device to identify the log upload.
optional string log_upload_id = 2;
}