metric_value.proto 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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.servicecontrol.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/servicecontrol/v1/distribution.proto";
  18. import "google/protobuf/timestamp.proto";
  19. import "google/type/money.proto";
  20. option cc_enable_arenas = true;
  21. option java_multiple_files = true;
  22. option java_outer_classname = "MetricValueSetProto";
  23. option java_package = "com.google.api.servicecontrol.v1";
  24. // Represents a single metric value.
  25. message MetricValue {
  26. // The labels describing the metric value.
  27. // See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
  28. // the overriding relationship.
  29. map<string, string> labels = 1;
  30. // The start of the time period over which this metric value's measurement
  31. // applies. The time period has different semantics for different metric
  32. // types (cumulative, delta, and gauge). See the metric definition
  33. // documentation in the service configuration for details.
  34. google.protobuf.Timestamp start_time = 2;
  35. // The end of the time period over which this metric value's measurement
  36. // applies.
  37. google.protobuf.Timestamp end_time = 3;
  38. // The value. The type of value used in the request must
  39. // agree with the metric definition in the service configuration, otherwise
  40. // the MetricValue is rejected.
  41. oneof value {
  42. // A boolean value.
  43. bool bool_value = 4;
  44. // A signed 64-bit integer value.
  45. int64 int64_value = 5;
  46. // A double precision floating point value.
  47. double double_value = 6;
  48. // A text string value.
  49. string string_value = 7;
  50. // A distribution value.
  51. Distribution distribution_value = 8;
  52. }
  53. }
  54. // Represents a set of metric values in the same metric.
  55. // Each metric value in the set should have a unique combination of start time,
  56. // end time, and label values.
  57. message MetricValueSet {
  58. // The metric name defined in the service configuration.
  59. string metric_name = 1;
  60. // The values in this metric.
  61. repeated MetricValue metric_values = 2;
  62. }