Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Santi/grpc agent 2nd try. CI #155

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4bb4519
WIP
santigimeno May 10, 2024
406e59c
agents: preliminar changes to support logs in otlp
santigimeno Jul 2, 2024
db7ce0e
agents: grpc agent wip
santigimeno Jun 27, 2024
bdb0d29
WIP
santigimeno Jul 3, 2024
3be04bd
WIP
santigimeno Jul 3, 2024
3631cdb
WIP
santigimeno Jul 3, 2024
d3691a2
WIP
santigimeno Jul 3, 2024
84945c8
WIP
santigimeno Jul 4, 2024
51abc91
WIp
santigimeno Jul 5, 2024
377c782
WIP
santigimeno Jul 8, 2024
0c4e884
WIP
santigimeno Jul 9, 2024
da9be82
WIP
santigimeno Jul 9, 2024
4b32052
WIP
santigimeno Jul 9, 2024
8f2d363
WIP:x
santigimeno Jul 10, 2024
efd222e
WIP
santigimeno Jul 10, 2024
0e23c7b
WIP
santigimeno Jul 10, 2024
b2f59a3
WIP
santigimeno Jul 10, 2024
d4ba9fc
WIP
santigimeno Jul 10, 2024
1ab0804
Added Metadata
santigimeno Jul 11, 2024
3a29833
WIP
santigimeno Jul 11, 2024
e70ce32
WIP
santigimeno Jul 11, 2024
0e17696
WIP
santigimeno Jul 11, 2024
c89bc33
WIP
santigimeno Jul 12, 2024
1486398
WIP
santigimeno Jul 12, 2024
d85937a
FIxup
santigimeno Jul 12, 2024
53e86f0
WIP
santigimeno Jul 12, 2024
2946dca
WIP
santigimeno Jul 12, 2024
6ff0296
WIP
santigimeno Jul 12, 2024
0d832a3
WIP
santigimeno Jul 13, 2024
b1512cf
WIP
santigimeno Jul 23, 2024
25fbf9d
WIP
santigimeno Jul 23, 2024
0b2f5f2
WIP
santigimeno Jul 24, 2024
d6b4deb
WIP
santigimeno Jul 24, 2024
923bf10
WIP
santigimeno Jul 24, 2024
cc356e9
WIP
santigimeno Jul 25, 2024
b453512
WIP
santigimeno Jul 25, 2024
d21977c
WIP
santigimeno Jul 25, 2024
016e502
WIP
santigimeno Jul 26, 2024
2f656ef
WIP
santigimeno Jul 26, 2024
9cdca8c
WIP
santigimeno Jul 26, 2024
e91278a
WIP
santigimeno Jul 26, 2024
b6def07
wait for ready
santigimeno Aug 1, 2024
fd6675f
merge final but only agents
santigimeno Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions agents/grpc/proto/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
~/software/protobuf/src/protoc --cpp_out=./agents/grpc/src/proto/ --grpc-cpp_out=./agents/grpc/src/proto/ --plugin="protoc-gen-grpc-cpp=./out/Release/grpc_cpp_plugin" --proto_path=agents/grpc/proto/ agents/grpc/proto/*.proto
10 changes: 10 additions & 0 deletions agents/grpc/proto/asset.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax = "proto3";

import "common.proto";

package grpcagent;

message Asset {
CommonResponse common = 1;
string data = 2;
}
43 changes: 43 additions & 0 deletions agents/grpc/proto/blocked_loop.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// I want to define here RuntimeResponse message which will be oneOf many other types of messages
// For example:
// - InfoResponse
// - PackagesResponse

syntax = "proto3";

import "common.proto";

package grpcagent;

message Stack {
bool is_eval = 1;
string script_name = 2;
string function_name = 3;
int32 line_number = 4;
int32 column = 5;
}

message BlockedLoopBody {
int64 thread_id = 1;
int32 blocked_for = 2;
int32 loop_id = 3;
int32 callback_cntr = 4;
repeated Stack stack = 5;
}

message BlockedLoopEvent {
CommonResponse common = 1;
BlockedLoopBody body = 2;
}

message UnblockedLoopBody {
int64 thread_id = 1;
int32 blocked_for = 2;
int32 loop_id = 3;
int32 callback_cntr = 4;
}

message UnblockedLoopEvent {
CommonResponse common = 1;
UnblockedLoopBody body = 2;
}
30 changes: 30 additions & 0 deletions agents/grpc/proto/command.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// I want to define here RuntimeResponse message which will be oneOf many other types of messages
// For example:
// - InfoResponse
// - PackagesResponse

syntax = "proto3";

import "cpu_profile.proto";
import "reconfigure.proto";

package grpcagent;

message CommandArgs {
oneof args {
ReconfigureBody reconfigure = 1;
CPUProfileArgs cpu_profile = 2;
}
}

message CommandRequest {
string requestId = 1;
uint32 version = 2;
string id = 3;
string command = 4;
CommandArgs args = 5;
}

message CommandResponse {
string error_message = 1;
}
14 changes: 14 additions & 0 deletions agents/grpc/proto/common.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax = "proto3";

package grpcagent;

message Time {
uint64 seconds = 1;
uint64 nanoseconds = 2;
}

message CommonResponse {
string requestId = 1;
string command = 2;
Time recorded = 3;
}
11 changes: 11 additions & 0 deletions agents/grpc/proto/cpu_profile.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = "proto3";

// import "common.proto";

package grpcagent;

message CPUProfileArgs {
uint64 thread_id = 1;
uint64 duration = 2;
map<string, string> metadata = 3;
}
28 changes: 28 additions & 0 deletions agents/grpc/proto/info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
syntax = "proto3";

import "common.proto";

package grpcagent;

message InfoBody {
string app = 1;
string arch = 2;
uint32 cpuCores = 3;
string cpuModel = 4;
string execPath = 5;
string hostname = 6;
string id = 7;
string main = 8;
string nodeEnv = 9;
uint32 pid = 10;
string platform = 11;
uint64 processStart = 12;
repeated string tags = 13;
uint64 totalMem = 14;
map<string, string> versions = 15;
}

message InfoEvent {
CommonResponse common = 1;
InfoBody body = 2;
}
24 changes: 24 additions & 0 deletions agents/grpc/proto/nsolid_service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";

import "asset.proto";
import "blocked_loop.proto";
import "command.proto";
import "info.proto";
import "packages.proto";
import "reconfigure.proto";

package grpcagent;

service NSolidService {
rpc Command (stream CommandResponse) returns (stream CommandRequest) {}
rpc ExportAsset (stream Asset) returns (EventResponse) {}
rpc ExportInfo (InfoEvent) returns (EventResponse) {}
rpc ExportPackages (PackagesEvent) returns (EventResponse) {}
rpc ExportBlockedLoop (BlockedLoopEvent) returns (EventResponse) {}
rpc ExportUnblockedLoop (UnblockedLoopEvent) returns (EventResponse) {}
rpc ExportReconfigure (ReconfigureEvent) returns (EventResponse) {}
}

message EventResponse {
string error_message = 1;
}
28 changes: 28 additions & 0 deletions agents/grpc/proto/packages.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// I want to define here RuntimeResponse message which will be oneOf many other types of messages
// For example:
// - InfoResponse
// - PackagesResponse

syntax = "proto3";

import "common.proto";

package grpcagent;

message PackagesEvent {
CommonResponse common = 1;
PackagesBody body = 2;
}

message PackagesBody {
repeated Package packages = 1;
}

message Package {
string path = 1;
string name = 2;
string version = 3;
string main = 4;
repeated string dependencies = 5;
bool required = 6;
}
24 changes: 24 additions & 0 deletions agents/grpc/proto/reconfigure.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";

import "common.proto";

package grpcagent;

message ReconfigureBody {
optional uint64 blockedLoopThreshold = 1;
optional uint64 interval = 2;
optional bool pauseMetrics = 3;
optional bool promiseTracking = 4;
optional bool redactSnapshots = 5;
optional string statsd = 6;
optional string statsdBucket = 7;
optional string statsdTags = 8;
repeated string tags = 9;
optional bool tracingEnabled = 10;
optional uint32 tracingModulesBlacklist = 11;
}

message ReconfigureEvent {
CommonResponse common = 1;
ReconfigureBody body = 2;
}
Loading