Debian Codegraph @

golang/gogo/metricspb/metrics.proto

raw
1 // DO NOT EDIT; THIS FILE IS AUTOGENERATED FROM ../../../metrics.proto
2 syntax = "proto3";
3
4 package lightstep.metrics;
5
6 option go_package = "metricspb";
7 option objc_class_prefix = "LSPB";
8 option java_multiple_files = true;
9 option java_package = "com.lightstep.tracer.grpc";
10
11 import "github.com/lightstep/lightstep-tracer-common/golang/gogo/collectorpb/collector.proto";
12 import "google/api/annotations.proto";
13 import "google/protobuf/duration.proto";
14 import "google/protobuf/timestamp.proto";
15
16 // MetricKind indicates the semantics of the points (i.e. how to interpret values
17 // relative to each other).
18 enum MetricKind {
19 // InvalidMetricKind is the default value for the MetricKind. Some languages' proto compilers
20 // (e.g. Go) return the default if no value is set. The default is marked invalid here to
21 // avoid a common mistake where a field is left unset and appears to be set to the default.
22 INVALID_METRIC_KIND = 0;
23
24 // Counter metrics measure change over an interval.
25 // When aggregated, counter metrics are usually added.
26 COUNTER = 1;
27
28 // Gauge metrics measure the value at a point in time.
29 // When aggregated, intermediate values are often dropped for the latest value.
30 GAUGE = 2;
31 }
32
33 // MetricPoint is an update to a single measure.
34 message MetricPoint {
35 // Kind indicates the semantics of this point. Kind should always be the same for a given metric
36 // name (e.g. "cpu.usage" should always have the same kind)
37 MetricKind kind = 1;
38
39 // MetricName indicates the metric being emitted.
40 string metric_name = 2;
41
42 // Start of the interval for which the points represent.
43 // - All Counter points will be assumed to represent the entire interval.
44 // - All Gauge points will be assumed to be instantaneous at the start of the interval.
45 google.protobuf.Timestamp start = 3;
46
47 // Duration of the interval for which the points represent. The end of the interval is start + duration.
48 // We expect this value to be unset or zero for Gauge points.
49 google.protobuf.Duration duration = 4;
50
51 // Labels contain labels specific to this point.
52 repeated collector.KeyValue labels = 5;
53
54 // Value represents the update being emitted. Values can be one of two types: uint64 or double.
55 // The type of the value should always be the same for a given metric name (e.g. "cpu.usage"
56 // should always have value type double).
57 oneof value {
58 uint64 uint64_value = 6;
59
60 double double_value = 7;
61 }
62 }
63
64 // IngestRequest is an update to one or more measures.
65 message IngestRequest {
66 // IdempotencyKey is a random string that should uniquely identify this report.
67 // It should be generated once and used for all retries. The server will use it
68 // to de-duplicate requests.
69 string idempotency_key = 1;
70
71 // Reporter contains information to identify the specific originator of this report.
72 lightstep.collector.Reporter reporter = 2;
73
74 // Points contain the individual updates.
75 repeated MetricPoint points = 3;
76 }
77
78 // IngestResponse is reserved for future use.
79 message IngestResponse {}
80
81 service MetricsService {
82 rpc Report(IngestRequest) returns (IngestResponse) {
83 option (google.api.http) = {
84 post: "/metrics"
85 body: "*"
86 };
87 }
88 }