logging.proto 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // Copyright 2016 Google Inc.
  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. import "google/api/annotations.proto";
  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,
  25. // the `library.googleapis.com/activity_history` log is
  26. // sent to both the producer and consumer projects, whereas
  27. // the `library.googleapis.com/purchase_history` log is only sent to the
  28. // producer project:
  29. //
  30. // monitored_resources:
  31. // - type: library.googleapis.com/branch
  32. // labels:
  33. // - key: /city
  34. // description: The city where the library branch is located in.
  35. // - key: /name
  36. // description: The name of the branch.
  37. // logs:
  38. // - name: library.googleapis.com/activity_history
  39. // labels:
  40. // - key: /customer_id
  41. // - name: library.googleapis.com/purchase_history
  42. // logging:
  43. // producer_destinations:
  44. // - monitored_resource: library.googleapis.com/branch
  45. // logs:
  46. // - library.googleapis.com/activity_history
  47. // - library.googleapis.com/purchase_history
  48. // consumer_destinations:
  49. // - monitored_resource: library.googleapis.com/branch
  50. // logs:
  51. // - library.googleapis.com/activity_history
  52. message Logging {
  53. // Configuration of a specific logging destination (the producer project
  54. // or the consumer project).
  55. message LoggingDestination {
  56. // The monitored resource type. The type must be defined in
  57. // [Service.monitored_resources][google.api.Service.monitored_resources] section.
  58. string monitored_resource = 3;
  59. // Names of the logs to be sent to this destination. Each name must
  60. // be defined in the [Service.logs][google.api.Service.logs] section.
  61. repeated string logs = 1;
  62. }
  63. // Logging configurations for sending logs to the producer project.
  64. // There can be multiple producer destinations, each one must have a
  65. // different monitored resource type. A log can be used in at most
  66. // one producer destination.
  67. repeated LoggingDestination producer_destinations = 1;
  68. // Logging configurations for sending logs to the consumer project.
  69. // There can be multiple consumer destinations, each one must have a
  70. // different monitored resource type. A log can be used in at most
  71. // one consumer destination.
  72. repeated LoggingDestination consumer_destinations = 2;
  73. }