-
Notifications
You must be signed in to change notification settings - Fork 573
/
ingester.proto
143 lines (118 loc) · 4.44 KB
/
ingester.proto
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
syntax = "proto3";
package ingester.v1;
import "google/v1/profile.proto";
import "push/v1/push.proto";
import "types/v1/types.proto";
service IngesterService {
rpc Push(push.v1.PushRequest) returns (push.v1.PushResponse) {}
rpc LabelValues(types.v1.LabelValuesRequest) returns (types.v1.LabelValuesResponse) {}
rpc LabelNames(types.v1.LabelNamesRequest) returns (types.v1.LabelNamesResponse) {}
rpc ProfileTypes(ProfileTypesRequest) returns (ProfileTypesResponse) {}
rpc Series(SeriesRequest) returns (SeriesResponse) {}
rpc Flush(FlushRequest) returns (FlushResponse) {}
rpc MergeProfilesStacktraces(stream MergeProfilesStacktracesRequest) returns (stream MergeProfilesStacktracesResponse) {}
rpc MergeProfilesLabels(stream MergeProfilesLabelsRequest) returns (stream MergeProfilesLabelsResponse) {}
rpc MergeProfilesPprof(stream MergeProfilesPprofRequest) returns (stream MergeProfilesPprofResponse) {}
}
message ProfileTypesRequest {}
message ProfileTypesResponse {
repeated types.v1.ProfileType profile_types = 1;
}
message SeriesRequest {
repeated string matchers = 1;
repeated string label_names = 2;
}
message SeriesResponse {
repeated types.v1.Labels labels_set = 2;
}
message FlushRequest {}
message FlushResponse {}
message SelectProfilesRequest {
string label_selector = 1;
types.v1.ProfileType type = 2;
int64 start = 3;
int64 end = 4;
}
message MergeProfilesStacktracesRequest {
// The client starts the stream with a request containing the profile type and the labels.
SelectProfilesRequest request = 1;
// Max nodes in the resulting tree.
optional int64 max_nodes = 3;
// On a batch of profiles, the client sends the profiles to keep for merging.
repeated bool profiles = 2;
}
message MergeProfilesStacktracesResult {
StacktracesMergeFormat format = 3;
// The list of stracktraces with their respective value
repeated StacktraceSample stacktraces = 1;
repeated string function_names = 2;
// Merge result marshaled to pyroscope tree bytes.
bytes tree_bytes = 4;
}
enum StacktracesMergeFormat {
MERGE_FORMAT_UNSPECIFIED = 0;
MERGE_FORMAT_STACKTRACES = 1;
MERGE_FORMAT_TREE = 2;
}
message MergeProfilesStacktracesResponse {
// The server replies batch of profiles.
// A last message without profiles signals the next message will be the result of the merge.
ProfileSets selectedProfiles = 1;
// The list of stracktraces for the profile with their respective value
MergeProfilesStacktracesResult result = 3;
}
message ProfileSets {
repeated types.v1.Labels labelsSets = 1;
repeated SeriesProfile profiles = 2;
}
message SeriesProfile {
// The labels index of the series
int32 labelIndex = 1;
// timestamp in milliseconds
int64 timestamp = 2;
}
// Profile represents a point in time profile.
message Profile {
// The ID of the profile.
string ID = 1;
// The name and type of the profile.
types.v1.ProfileType type = 2;
// LabelPair is the key value pairs to identify the corresponding profile
repeated types.v1.LabelPair labels = 3;
// Timestamp is when that profile was created
int64 timestamp = 4;
// The list of stracktraces for the profile with their respective value
repeated StacktraceSample stacktraces = 5;
}
message StacktraceSample {
repeated int32 function_ids = 1;
int64 value = 2;
}
message MergeProfilesLabelsRequest {
// The client starts the stream with a request containing the profile type and the labels.
SelectProfilesRequest request = 1;
// The labels to merge by
repeated string by = 2;
// On a batch of profiles, the client sends the profiles to keep for merging.
repeated bool profiles = 3;
}
message MergeProfilesLabelsResponse {
// The server replies batch of profiles.
// A last message without profiles signals the next message will be the result of the merge.
ProfileSets selectedProfiles = 1;
// The list of series for the profile with their respective value
repeated types.v1.Series series = 2;
}
message MergeProfilesPprofRequest {
// The client starts the stream with a request containing the profile type and the labels.
SelectProfilesRequest request = 1;
// On a batch of profiles, the client sends the profiles to keep for merging.
repeated bool profiles = 2;
}
message MergeProfilesPprofResponse {
// The server replies batch of profiles.
// A last message without profiles signals the next message will be the result of the merge.
ProfileSets selectedProfiles = 1;
// The merge result in the pprof format.
bytes result = 2;
}