logging.proto 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Copyright 2023 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. syntax = "proto3";
  15. package google.api;
  16. option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
  17. option java_multiple_files = true;
  18. option java_outer_classname = "LoggingProto";
  19. option java_package = "com.google.api";
  20. option objc_class_prefix = "GAPI";
  21. // Logging configuration of the service.
  22. //
  23. // The following example shows how to configure logs to be sent to the
  24. // producer and consumer projects. In the example, the `activity_history`
  25. // log is sent to both the producer and consumer projects, whereas the
  26. // `purchase_history` log is only sent to the producer project.
  27. //
  28. // monitored_resources:
  29. // - type: library.googleapis.com/branch
  30. // labels:
  31. // - key: /city
  32. // description: The city where the library branch is located in.
  33. // - key: /name
  34. // description: The name of the branch.
  35. // logs:
  36. // - name: activity_history
  37. // labels:
  38. // - key: /customer_id
  39. // - name: purchase_history
  40. // logging:
  41. // producer_destinations:
  42. // - monitored_resource: library.googleapis.com/branch
  43. // logs:
  44. // - activity_history
  45. // - purchase_history
  46. // consumer_destinations:
  47. // - monitored_resource: library.googleapis.com/branch
  48. // logs:
  49. // - activity_history
  50. message Logging {
  51. // Configuration of a specific logging destination (the producer project
  52. // or the consumer project).
  53. message LoggingDestination {
  54. // The monitored resource type. The type must be defined in the
  55. // [Service.monitored_resources][google.api.Service.monitored_resources]
  56. // 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
  60. // log name is not a domain scoped name, it will be automatically prefixed
  61. // with 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. }