-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrace.proto
More file actions
57 lines (47 loc) · 1.69 KB
/
trace.proto
File metadata and controls
57 lines (47 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/** Service responsible for collecting metrics from Compass */
syntax = "proto3";
package workflow;
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
option go_package = "./pb";
service trace {
// Stream Compass traces from a specific environment.
rpc StreamTraces (StreamTracesRequest) returns (stream StreamTracesResponse) {}
}
/**
* Input for StreamTraces.
*/
message StreamTracesRequest {
string environment = 1; // The environment to stream traces from.
}
/**
* Output for StreamTraces.
*/
message StreamTracesResponse {
repeated Trace Traces = 1; // List of traces.
}
/**
* Trace data provided by Compass.
*/
message Trace {
TraceMetadata metadata = 1; // Metadata about the trace.
repeated TraceFunctionCall function_calls = 2; // List of function calls in the trace.
}
/**
* Metadata which contains information about the trace.
*/
message TraceMetadata {
string request_id = 1; // Request identifier for tracking.
string uri = 2; // URI of the request being traced.
string method = 3; // HTTP method of the request (e.g., GET, POST).
google.protobuf.Timestamp start_time = 4; // Start time of the trace in unix format.
google.protobuf.Timestamp end_time = 5; // End time of the trace in unix format.
}
/**
* Function call data within a trace.
*/
message TraceFunctionCall {
string name = 1; // Name of the function being traced.
google.protobuf.Timestamp start_time = 2; // Start time of the function call in unix format.
google.protobuf.Duration elapsed = 3; // Elapsed time for the function call in milliseconds.
}