xref: /aosp_15_r20/external/googleapis/google/api/logging.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.api;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workeroption go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
20*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
21*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "LoggingProto";
22*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.api";
23*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GAPI";
24*d5c09012SAndroid Build Coastguard Worker
25*d5c09012SAndroid Build Coastguard Worker// Logging configuration of the service.
26*d5c09012SAndroid Build Coastguard Worker//
27*d5c09012SAndroid Build Coastguard Worker// The following example shows how to configure logs to be sent to the
28*d5c09012SAndroid Build Coastguard Worker// producer and consumer projects. In the example, the `activity_history`
29*d5c09012SAndroid Build Coastguard Worker// log is sent to both the producer and consumer projects, whereas the
30*d5c09012SAndroid Build Coastguard Worker// `purchase_history` log is only sent to the producer project.
31*d5c09012SAndroid Build Coastguard Worker//
32*d5c09012SAndroid Build Coastguard Worker//     monitored_resources:
33*d5c09012SAndroid Build Coastguard Worker//     - type: library.googleapis.com/branch
34*d5c09012SAndroid Build Coastguard Worker//       labels:
35*d5c09012SAndroid Build Coastguard Worker//       - key: /city
36*d5c09012SAndroid Build Coastguard Worker//         description: The city where the library branch is located in.
37*d5c09012SAndroid Build Coastguard Worker//       - key: /name
38*d5c09012SAndroid Build Coastguard Worker//         description: The name of the branch.
39*d5c09012SAndroid Build Coastguard Worker//     logs:
40*d5c09012SAndroid Build Coastguard Worker//     - name: activity_history
41*d5c09012SAndroid Build Coastguard Worker//       labels:
42*d5c09012SAndroid Build Coastguard Worker//       - key: /customer_id
43*d5c09012SAndroid Build Coastguard Worker//     - name: purchase_history
44*d5c09012SAndroid Build Coastguard Worker//     logging:
45*d5c09012SAndroid Build Coastguard Worker//       producer_destinations:
46*d5c09012SAndroid Build Coastguard Worker//       - monitored_resource: library.googleapis.com/branch
47*d5c09012SAndroid Build Coastguard Worker//         logs:
48*d5c09012SAndroid Build Coastguard Worker//         - activity_history
49*d5c09012SAndroid Build Coastguard Worker//         - purchase_history
50*d5c09012SAndroid Build Coastguard Worker//       consumer_destinations:
51*d5c09012SAndroid Build Coastguard Worker//       - monitored_resource: library.googleapis.com/branch
52*d5c09012SAndroid Build Coastguard Worker//         logs:
53*d5c09012SAndroid Build Coastguard Worker//         - activity_history
54*d5c09012SAndroid Build Coastguard Workermessage Logging {
55*d5c09012SAndroid Build Coastguard Worker  // Configuration of a specific logging destination (the producer project
56*d5c09012SAndroid Build Coastguard Worker  // or the consumer project).
57*d5c09012SAndroid Build Coastguard Worker  message LoggingDestination {
58*d5c09012SAndroid Build Coastguard Worker    // The monitored resource type. The type must be defined in the
59*d5c09012SAndroid Build Coastguard Worker    // [Service.monitored_resources][google.api.Service.monitored_resources]
60*d5c09012SAndroid Build Coastguard Worker    // section.
61*d5c09012SAndroid Build Coastguard Worker    string monitored_resource = 3;
62*d5c09012SAndroid Build Coastguard Worker
63*d5c09012SAndroid Build Coastguard Worker    // Names of the logs to be sent to this destination. Each name must
64*d5c09012SAndroid Build Coastguard Worker    // be defined in the [Service.logs][google.api.Service.logs] section. If the
65*d5c09012SAndroid Build Coastguard Worker    // log name is not a domain scoped name, it will be automatically prefixed
66*d5c09012SAndroid Build Coastguard Worker    // with the service name followed by "/".
67*d5c09012SAndroid Build Coastguard Worker    repeated string logs = 1;
68*d5c09012SAndroid Build Coastguard Worker  }
69*d5c09012SAndroid Build Coastguard Worker
70*d5c09012SAndroid Build Coastguard Worker  // Logging configurations for sending logs to the producer project.
71*d5c09012SAndroid Build Coastguard Worker  // There can be multiple producer destinations, each one must have a
72*d5c09012SAndroid Build Coastguard Worker  // different monitored resource type. A log can be used in at most
73*d5c09012SAndroid Build Coastguard Worker  // one producer destination.
74*d5c09012SAndroid Build Coastguard Worker  repeated LoggingDestination producer_destinations = 1;
75*d5c09012SAndroid Build Coastguard Worker
76*d5c09012SAndroid Build Coastguard Worker  // Logging configurations for sending logs to the consumer project.
77*d5c09012SAndroid Build Coastguard Worker  // There can be multiple consumer destinations, each one must have a
78*d5c09012SAndroid Build Coastguard Worker  // different monitored resource type. A log can be used in at most
79*d5c09012SAndroid Build Coastguard Worker  // one consumer destination.
80*d5c09012SAndroid Build Coastguard Worker  repeated LoggingDestination consumer_destinations = 2;
81*d5c09012SAndroid Build Coastguard Worker}
82