1 // Copyright 2018 Google LLC.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
20 import "google/api/annotations.proto";
22 option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
23 option java_multiple_files = true;
24 option java_outer_classname = "MonitoringProto";
25 option java_package = "com.google.api";
26 option objc_class_prefix = "GAPI";
28 // Monitoring configuration of the service.
30 // The example below shows how to configure monitored resources and metrics
31 // for monitoring. In the example, a monitored resource and two metrics are
32 // defined. The `library.googleapis.com/book/returned_count` metric is sent
33 // to both producer and consumer projects, whereas the
34 // `library.googleapis.com/book/overdue_count` metric is only sent to the
37 // monitored_resources:
38 // - type: library.googleapis.com/branch
41 // description: The city where the library branch is located in.
43 // description: The name of the branch.
45 // - name: library.googleapis.com/book/returned_count
49 // - key: /customer_id
50 // - name: library.googleapis.com/book/overdue_count
54 // - key: /customer_id
56 // producer_destinations:
57 // - monitored_resource: library.googleapis.com/branch
59 // - library.googleapis.com/book/returned_count
60 // consumer_destinations:
61 // - monitored_resource: library.googleapis.com/branch
63 // - library.googleapis.com/book/returned_count
64 // - library.googleapis.com/book/overdue_count
66 // Configuration of a specific monitoring destination (the producer project
67 // or the consumer project).
68 message MonitoringDestination {
69 // The monitored resource type. The type must be defined in
70 // [Service.monitored_resources][google.api.Service.monitored_resources]
72 string monitored_resource = 1;
74 // Types of the metrics to report to this monitoring destination.
75 // Each type must be defined in
76 // [Service.metrics][google.api.Service.metrics] section.
77 repeated string metrics = 2;
80 // Monitoring configurations for sending metrics to the producer project.
81 // There can be multiple producer destinations. A monitored resouce type may
82 // appear in multiple monitoring destinations if different aggregations are
83 // needed for different sets of metrics associated with that monitored
84 // resource type. A monitored resource and metric pair may only be used once
85 // in the Monitoring configuration.
86 repeated MonitoringDestination producer_destinations = 1;
88 // Monitoring configurations for sending metrics to the consumer project.
89 // There can be multiple consumer destinations. A monitored resouce type may
90 // appear in multiple monitoring destinations if different aggregations are
91 // needed for different sets of metrics associated with that monitored
92 // resource type. A monitored resource and metric pair may only be used once
93 // in the Monitoring configuration.
94 repeated MonitoringDestination consumer_destinations = 2;