• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.cobalt.logging;
18 
19 /** The API for providing operation logging to Cobalt. */
20 public interface CobaltOperationLogger {
21 
22     /**
23      * Logs that a Cobalt logging event exceeds the string buffer max.
24      *
25      * @param metricId the Cobalt metric id of the event that is being logged
26      * @param reportId the Cobalt report id of the event that is being logged
27      */
logStringBufferMaxExceeded(int metricId, int reportId)28     void logStringBufferMaxExceeded(int metricId, int reportId);
29 
30     /**
31      * Logs that a Cobalt logging event exceeds the event vector buffer max.
32      *
33      * @param metricId the Cobalt metric id of the event that is being logged
34      * @param reportId the Cobalt report id of the event that is being logged
35      */
logEventVectorBufferMaxExceeded(int metricId, int reportId)36     void logEventVectorBufferMaxExceeded(int metricId, int reportId);
37 
38     /**
39      * Logs that a Cobalt logging event exceeds the max value when calculating its private index.
40      *
41      * @param metricId the Cobalt metric id of the event that is being logged
42      * @param reportId the Cobalt report id of the event that is being logged
43      */
logMaxValueExceeded(int metricId, int reportId)44     void logMaxValueExceeded(int metricId, int reportId);
45 
46     /** Logs the Cobalt periodic job failed to upload envelopes. */
logUploadFailure()47     void logUploadFailure();
48 
49     /** Logs the Cobalt periodic job uploaded envelopes successfully. */
logUploadSuccess()50     void logUploadSuccess();
51 }
52