• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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.adservices.service.stats;
18 
19 /** Interface for Adservices logger. */
20 public interface AdServicesLogger {
21     /** log method for MeasurementReportsStats. */
logMeasurementReports(MeasurementReportsStats measurementReportsStats)22     void logMeasurementReports(MeasurementReportsStats measurementReportsStats);
23 
24     /** log ApiCallStats which has stats about the API call such as the status. */
logApiCallStats(ApiCallStats apiCallStats)25     void logApiCallStats(ApiCallStats apiCallStats);
26 
27     /** log UIStats which has stats about UI events. */
logUIStats(UIStats uiStats)28     void logUIStats(UIStats uiStats);
29 
30     /** Logs API call stats specific to the FLEDGE APIs as an {@link ApiCallStats} object. */
logFledgeApiCallStats(int apiName, int resultCode, int latencyMs)31     void logFledgeApiCallStats(int apiName, int resultCode, int latencyMs);
32 
33     /** Logs measurement registrations response size. */
logMeasurementRegistrationsResponseSize(MeasurementRegistrationResponseStats stats)34     void logMeasurementRegistrationsResponseSize(MeasurementRegistrationResponseStats stats);
35 
36     /**
37      * Logs the runAdSelection process stats as an {@link RunAdSelectionProcessReportedStats}
38      * object.
39      */
logRunAdSelectionProcessReportedStats(RunAdSelectionProcessReportedStats stats)40     void logRunAdSelectionProcessReportedStats(RunAdSelectionProcessReportedStats stats);
41 
42     /**
43      * Logs the runAdBidding process stats as an {@link RunAdBiddingProcessReportedStats} object.
44      */
logRunAdBiddingProcessReportedStats(RunAdBiddingProcessReportedStats stats)45     void logRunAdBiddingProcessReportedStats(RunAdBiddingProcessReportedStats stats);
46 
47     /**
48      * Logs the runAdScoring process stats as an {@link RunAdScoringProcessReportedStats} object.
49      */
logRunAdScoringProcessReportedStats(RunAdScoringProcessReportedStats stats)50     void logRunAdScoringProcessReportedStats(RunAdScoringProcessReportedStats stats);
51 
52     /**
53      * Logs the runAdBiddingPerCA process stats as an {@link RunAdBiddingPerCAProcessReportedStats}
54      * object.
55      */
logRunAdBiddingPerCAProcessReportedStats(RunAdBiddingPerCAProcessReportedStats stats)56     void logRunAdBiddingPerCAProcessReportedStats(RunAdBiddingPerCAProcessReportedStats stats);
57 
58     /**
59      * Logs the backgroundFetch process stats as an {@link BackgroundFetchProcessReportedStats}
60      * object.
61      */
logBackgroundFetchProcessReportedStats(BackgroundFetchProcessReportedStats stats)62     void logBackgroundFetchProcessReportedStats(BackgroundFetchProcessReportedStats stats);
63 
64     /**
65      * Logs the updateCustomAudience process stats as an {@link
66      * com.android.adservices.service.stats.UpdateCustomAudienceProcessReportedStats} objects.
67      */
logUpdateCustomAudienceProcessReportedStats( UpdateCustomAudienceProcessReportedStats stats)68     void logUpdateCustomAudienceProcessReportedStats(
69             UpdateCustomAudienceProcessReportedStats stats);
70 
71     /**
72      * Logs GetTopics API call stats as an {@link
73      * com.android.adservices.service.stats.GetTopicsReportedStats} object.
74      */
logGetTopicsReportedStats(GetTopicsReportedStats stats)75     void logGetTopicsReportedStats(GetTopicsReportedStats stats);
76 
77     /**
78      * Logs stats for getTopTopics as an {@link
79      * com.android.adservices.service.stats.EpochComputationGetTopTopicsStats} object.
80      */
logEpochComputationGetTopTopicsStats(EpochComputationGetTopTopicsStats stats)81     void logEpochComputationGetTopTopicsStats(EpochComputationGetTopTopicsStats stats);
82 
83     /**
84      * Logs classifier stats during epoch computation as an {@link
85      * com.android.adservices.service.stats.EpochComputationClassifierStats} object.
86      */
logEpochComputationClassifierStats(EpochComputationClassifierStats stats)87     void logEpochComputationClassifierStats(EpochComputationClassifierStats stats);
88 
89     /** Logs measurement debug keys stats. */
logMeasurementDebugKeysMatch(MsmtDebugKeysMatchStats stats)90     void logMeasurementDebugKeysMatch(MsmtDebugKeysMatchStats stats);
91 
92     /** Logs measurement attribution stats. */
logMeasurementAttributionStats(MeasurementAttributionStats measurementAttributionStats)93     void logMeasurementAttributionStats(MeasurementAttributionStats measurementAttributionStats);
94 
95     /** Logs measurement wipeout stats. */
logMeasurementWipeoutStats(MeasurementWipeoutStats measurementWipeoutStats)96     void logMeasurementWipeoutStats(MeasurementWipeoutStats measurementWipeoutStats);
97 
98     /** Logs measurement delayed source registration stats. */
logMeasurementDelayedSourceRegistrationStats( MeasurementDelayedSourceRegistrationStats measurementDelayedSourceRegistrationStats)99     void logMeasurementDelayedSourceRegistrationStats(
100             MeasurementDelayedSourceRegistrationStats measurementDelayedSourceRegistrationStats);
101 }
102