Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / api / monitoring.proto
1 // Copyright 2018 Google LLC.
2 //
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
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
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.
14 //
15
16 syntax = "proto3";
17
18 package google.api;
19
20 import "google/api/annotations.proto";
21
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";
27
28 // Monitoring configuration of the service.
29 //
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
35 // consumer project.
36 //
37 //     monitored_resources:
38 //     - type: library.googleapis.com/branch
39 //       labels:
40 //       - key: /city
41 //         description: The city where the library branch is located in.
42 //       - key: /name
43 //         description: The name of the branch.
44 //     metrics:
45 //     - name: library.googleapis.com/book/returned_count
46 //       metric_kind: DELTA
47 //       value_type: INT64
48 //       labels:
49 //       - key: /customer_id
50 //     - name: library.googleapis.com/book/overdue_count
51 //       metric_kind: GAUGE
52 //       value_type: INT64
53 //       labels:
54 //       - key: /customer_id
55 //     monitoring:
56 //       producer_destinations:
57 //       - monitored_resource: library.googleapis.com/branch
58 //         metrics:
59 //         - library.googleapis.com/book/returned_count
60 //       consumer_destinations:
61 //       - monitored_resource: library.googleapis.com/branch
62 //         metrics:
63 //         - library.googleapis.com/book/returned_count
64 //         - library.googleapis.com/book/overdue_count
65 message Monitoring {
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]
71     // section.
72     string monitored_resource = 1;
73
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;
78   }
79
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;
87
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;
95 }