blob: 76b357c8d47bda466d1397c6c46676ec0aef7a3e [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.legacymetrics;
/// Accepts metrics events and uploads them to UMA servers for analysis. Metrics
/// events are batched and uploaded at a regular interval. If this service is
/// unable to upload events, it will try persisting them for later re-upload.
/// For similar behavior, see Chromium's MetricsService:
protocol MetricsRecorder {
/// Processes and enqueues a batch of events for upload. Returns after the
/// provided metrics are successfully processed by the service. Clients
/// should wait for a completion callback before sending subsequent Record()
/// requests.
Record(struct {
events vector<Event>:MAX;
}) -> ();
/// Indicates that this service will close all connections soon. Upon
/// receiving this event, each client should call Record() once for any
/// available metrics and close its connection to this sevice. Otherwise,
/// this service will close all incoming connections after a predefined
/// timeout starting from the moment it broadcasts this event.
-> OnCloseSoon();