logging.proto 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 = "LoggingProto";
  20. option java_package = "com.google.api";
  21. option objc_class_prefix = "GAPI";
  22. // Logging configuration of the service.
  23. //
  24. // The following example shows how to configure logs to be sent to the
  25. // producer and consumer projects. In the example, the `activity_history`
  26. // log is sent to both the producer and consumer projects, whereas the
  27. // `purchase_history` log is only sent to the producer project.
  28. //
  29. // monitored_resources:
  30. // - type: library.googleapis.com/branch
  31. // labels:
  32. // - key: /city
  33. // description: The city where the library branch is located in.
  34. // - key: /name
  35. // description: The name of the branch.
  36. // logs:
  37. // - name: activity_history
  38. // labels:
  39. // - key: /customer_id
  40. // - name: purchase_history
  41. // logging:
  42. // producer_destinations:
  43. // - monitored_resource: library.googleapis.com/branch
  44. // logs:
  45. // - activity_history
  46. // - purchase_history
  47. // consumer_destinations:
  48. // - monitored_resource: library.googleapis.com/branch
  49. // logs:
  50. // - activity_history
  51. message Logging {
  52. // Configuration of a specific logging destination (the producer project
  53. // or the consumer project).
  54. message LoggingDestination {
  55. // The monitored resource type. The type must be defined in the
  56. // [Service.monitored_resources][google.api.Service.monitored_resources] section.
  57. string monitored_resource = 3;
  58. // Names of the logs to be sent to this destination. Each name must
  59. // be defined in the [Service.logs][google.api.Service.logs] section. If the log name is
  60. // not a domain scoped name, it will be automatically prefixed with
  61. // the service name followed by "/".
  62. repeated string logs = 1;
  63. }
  64. // Logging configurations for sending logs to the producer project.
  65. // There can be multiple producer destinations, each one must have a
  66. // different monitored resource type. A log can be used in at most
  67. // one producer destination.
  68. repeated LoggingDestination producer_destinations = 1;
  69. // Logging configurations for sending logs to the consumer project.
  70. // There can be multiple consumer destinations, each one must have a
  71. // different monitored resource type. A log can be used in at most
  72. // one consumer destination.
  73. repeated LoggingDestination consumer_destinations = 2;
  74. }