1// DO NOT EDIT; THIS FILE IS AUTOGENERATED FROM ../../../collector.proto
2syntax = "proto3";
3
4package lightstep.collector;
5
6option go_package = "collectorpb";
7option objc_class_prefix = "LSPB";
8option java_multiple_files = true;
9option java_package = "com.lightstep.tracer.grpc";
10
11import "google/protobuf/timestamp.proto";
12import "google/api/annotations.proto";
13
14message SpanContext {
15    uint64 trace_id = 1 [jstype=JS_STRING];
16    uint64 span_id = 2 [jstype=JS_STRING];
17    map<string, string> baggage = 3;
18}
19
20// Represent both tags and log fields.
21message KeyValue {
22    string key = 1;
23    oneof value {
24        // Holds arbitrary string data; well-formed JSON strings should go in
25        // json_value.
26        string string_value = 2;
27        int64 int_value = 3 [jstype=JS_STRING];
28        double double_value = 4;
29        bool bool_value = 5;
30        // Must be a well-formed JSON value. Truncated JSON should go in
31        // string_value. Should not be used for tags.
32        string json_value = 6;
33    }
34}
35
36message Log {
37    google.protobuf.Timestamp timestamp = 1;
38    repeated KeyValue fields = 2;
39}
40
41message Reference {
42    enum Relationship {
43        CHILD_OF = 0;
44        FOLLOWS_FROM = 1;
45    }
46    Relationship relationship = 1;
47    SpanContext span_context = 2;
48}
49
50message Span {
51    SpanContext span_context = 1;
52    string operation_name = 2;
53    repeated Reference references = 3;
54    google.protobuf.Timestamp start_timestamp = 4;
55    uint64 duration_micros = 5 [jstype=JS_STRING];
56    repeated KeyValue tags = 6;
57    repeated Log logs = 7;
58}
59
60message Reporter {
61    uint64 reporter_id = 1 [jstype=JS_STRING];
62    repeated KeyValue tags = 4;
63}
64
65message MetricsSample {
66    string name = 1;
67    oneof value {
68        int64 int_value = 2 [jstype=JS_STRING];
69        double double_value = 3;
70    }
71}
72
73message InternalMetrics {
74    google.protobuf.Timestamp start_timestamp = 1;
75    uint64 duration_micros = 2 [jstype=JS_STRING];
76    repeated Log logs = 3;
77    repeated MetricsSample counts = 4;
78    repeated MetricsSample gauges = 5;
79}
80
81message Auth {
82    string access_token = 1;
83}
84
85message ReportRequest {
86    Reporter reporter = 1;
87    Auth auth = 2;
88    repeated Span spans = 3;
89    int64 timestamp_offset_micros = 5 [jstype=JS_STRING];
90    InternalMetrics internal_metrics = 6;
91}
92
93message Command {
94    bool disable = 1;
95    bool dev_mode = 2;
96}
97
98message ReportResponse {
99    repeated Command commands = 1;
100    google.protobuf.Timestamp receive_timestamp = 2;
101    google.protobuf.Timestamp transmit_timestamp = 3;
102    repeated string errors = 4;
103    repeated string warnings = 5;
104    repeated string infos = 6;
105}
106
107service CollectorService {
108    rpc Report(ReportRequest) returns (ReportResponse) {
109       option (google.api.http) = {
110          post: "/api/v2/reports"
111          body: "*"
112          additional_bindings {
113             get: "/api/v2/reports"
114          }
115       };
116    }
117}
118