monitoring.proto 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // Copyright 2019 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. syntax = "proto3";
  16. package google.api;
  17. option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "MonitoringProto";
  20. option java_package = "com.google.api";
  21. option objc_class_prefix = "GAPI";
  22. // Monitoring configuration of the service.
  23. //
  24. // The example below shows how to configure monitored resources and metrics
  25. // for monitoring. In the example, a monitored resource and two metrics are
  26. // defined. The `library.googleapis.com/book/returned_count` metric is sent
  27. // to both producer and consumer projects, whereas the
  28. // `library.googleapis.com/book/overdue_count` metric is only sent to the
  29. // consumer project.
  30. //
  31. // monitored_resources:
  32. // - type: library.googleapis.com/branch
  33. // labels:
  34. // - key: /city
  35. // description: The city where the library branch is located in.
  36. // - key: /name
  37. // description: The name of the branch.
  38. // metrics:
  39. // - name: library.googleapis.com/book/returned_count
  40. // metric_kind: DELTA
  41. // value_type: INT64
  42. // labels:
  43. // - key: /customer_id
  44. // - name: library.googleapis.com/book/overdue_count
  45. // metric_kind: GAUGE
  46. // value_type: INT64
  47. // labels:
  48. // - key: /customer_id
  49. // monitoring:
  50. // producer_destinations:
  51. // - monitored_resource: library.googleapis.com/branch
  52. // metrics:
  53. // - library.googleapis.com/book/returned_count
  54. // consumer_destinations:
  55. // - monitored_resource: library.googleapis.com/branch
  56. // metrics:
  57. // - library.googleapis.com/book/returned_count
  58. // - library.googleapis.com/book/overdue_count
  59. message Monitoring {
  60. // Configuration of a specific monitoring destination (the producer project
  61. // or the consumer project).
  62. message MonitoringDestination {
  63. // The monitored resource type. The type must be defined in
  64. // [Service.monitored_resources][google.api.Service.monitored_resources] section.
  65. string monitored_resource = 1;
  66. // Types of the metrics to report to this monitoring destination.
  67. // Each type must be defined in [Service.metrics][google.api.Service.metrics] section.
  68. repeated string metrics = 2;
  69. }
  70. // Monitoring configurations for sending metrics to the producer project.
  71. // There can be multiple producer destinations. A monitored resouce type may
  72. // appear in multiple monitoring destinations if different aggregations are
  73. // needed for different sets of metrics associated with that monitored
  74. // resource type. A monitored resource and metric pair may only be used once
  75. // in the Monitoring configuration.
  76. repeated MonitoringDestination producer_destinations = 1;
  77. // Monitoring configurations for sending metrics to the consumer project.
  78. // There can be multiple consumer destinations. A monitored resouce type may
  79. // appear in multiple monitoring destinations if different aggregations are
  80. // needed for different sets of metrics associated with that monitored
  81. // resource type. A monitored resource and metric pair may only be used once
  82. // in the Monitoring configuration.
  83. repeated MonitoringDestination consumer_destinations = 2;
  84. }