Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
95694f4
src: implement ContinuousProfiler class
santigimeno Mar 20, 2025
89bbd13
lib: add continuous CPU profiling configuration
santigimeno Mar 20, 2025
8b946c7
src: integrate ContinuousProfiler with EnvList
santigimeno Mar 20, 2025
dbc3bfb
test: add continuous profiling configuration tests
santigimeno Mar 20, 2025
6edac0b
agents: add ExportContinuousProfile rpc
santigimeno Mar 20, 2025
b152771
agents: grow AssetStream to support cont profiling
santigimeno Mar 20, 2025
719d1d9
agents: add continuous profiling to gRPC agent
santigimeno Mar 20, 2025
20fcee1
test: add gRPC continuous profiling tests
santigimeno Mar 20, 2025
0d7656a
agents: fix cont profiling timestamp calculation
santigimeno May 6, 2025
30fd0c8
agents: support `contCpuProfile` command in the GRPC interface
juanarbol Apr 25, 2025
f091fbf
src: store hasEbpfSupport metadata in info.proto
RafaelGSS Apr 9, 2025
0c4d943
deps: update libcurl to 8.13.0
santigimeno Apr 30, 2025
612194b
deps: update json to 3.12.0
santigimeno May 2, 2025
075bd94
src: fix thread-safety issues @ ContinuousProfiler
santigimeno May 7, 2025
90eafbf
agents: optimize span collector message sending
santigimeno Apr 2, 2025
02dc13f
deps: update opentelemetry-cpp to 1.21.0
santigimeno Jun 3, 2025
e837016
deps: add support for exporting Summary via OTLP
santigimeno Sep 12, 2024
d8ce1e2
deps: update protobuf to 30.2 and grpc to 1.72.0
santigimeno May 6, 2025
2bc1dff
src: add batched support callback in AsyncTSQueue
santigimeno May 29, 2025
7fe02f1
src: optimize async notifications in enqueue
santigimeno Jun 2, 2025
76871c7
src: add batching options to AsyncTSQueue
santigimeno Jun 2, 2025
c2a01f6
tools: add script to regenerate protofiles
santigimeno Jun 6, 2025
627fa30
deps: update libcurl to 8.15.0
santigimeno Jun 5, 2025
fd348ca
deps: update protobuf to 31.1
santigimeno Jun 6, 2025
224d4f2
deps: update grpc to 1.73.1
santigimeno Jun 5, 2025
79e1a44
src: add fast api calls to push span strings
santigimeno Mar 27, 2025
c84c4a5
src: add fast api call to get spanId and traceId
santigimeno Mar 28, 2025
dc9e724
tools: fix linting in update-protobuf.sh updater
santigimeno Jul 23, 2025
34deec8
build,test: make test-grpc-packages pass again
santigimeno Aug 5, 2025
e86da9e
agents: fix crash accessing cont prof queue
santigimeno Jul 24, 2025
4529c0d
deps: update protobuf to 32.0
santigimeno Aug 18, 2025
cc82045
build: real fix for test-grpc-packages
santigimeno Aug 7, 2025
7d36db6
agents: enable compression in GrpcAgent
santigimeno Jul 23, 2025
3f12b54
deps: update to opentelemetry 1.22.0
santigimeno Jul 22, 2025
5f70101
deps: add support for exporting Summary via OTLP
santigimeno Sep 12, 2024
77681f0
deps: update grpc to 1.74.0
santigimeno Jul 29, 2025
f0613c6
src: make AsyncTSQueue C++17 compatible
santigimeno Aug 25, 2025
2686a94
deps,win: fix protobuf abseil-cpp compilation
santigimeno Aug 25, 2025
d88ac21
deps,win: fix grpc build
santigimeno Aug 25, 2025
50a881e
lib: only use gRPC to connect to SaaS
santigimeno Jul 18, 2025
e0cdb52
test: fix test-zmq-packages.mjs agents test
santigimeno Aug 25, 2025
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.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ test-agents-prereqs:
env npm_config_nodedir=$(PWD) $(NODE) ./deps/npm install zeromq@5 base85 --prefix test/common/nsolid-zmq-agent --no-save --no-package-lock
env npm_config_nodedir=$(PWD) $(NODE) ./deps/npm run build:libzmq --prefix test/common/nsolid-zmq-agent/node_modules/zeromq
env npm_config_nodedir=$(PWD) $(NODE) ./deps/npm install @opentelemetry/otlp-proto-exporter-base @grpc/grpc-js @grpc/proto-loader --prefix test/common/nsolid-otlp-agent --no-save --no-package-lock
env npm_config_nodedir=$(PWD) $(NODE) ./deps/npm install @grpc/grpc-js @grpc/proto-loader --prefix test/common/nsolid-grpc-agent --no-save --no-package-lock
env npm_config_nodedir=$(PWD) $(NODE) ./deps/npm install @grpc/grpc-js @grpc/proto-loader@0.7 --prefix test/common/nsolid-grpc-agent --no-save --no-package-lock

.PHONY: test-agents-prereqs-clean
test-agents-prereqs-clean:
Expand Down
4 changes: 3 additions & 1 deletion agents/grpc/proto/asset.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ message Asset {
google.protobuf.Struct metadata = 3;
string data = 4;
bool complete = 5;
uint64 duration = 6;
uint64 duration = 6; // Duration of the profile in milliseconds
double start_ts = 7; // Timestamp when the profile was taken in milliseconds from epoch
double end_ts = 8; // Timestamp when the profile was completed in milliseconds from epoch
}
1 change: 1 addition & 0 deletions agents/grpc/proto/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ message InfoBody {
repeated string tags = 13;
uint64 totalMem = 14;
map<string, string> versions = 15;
uint32 kernelVersion = 16;
}

message InfoEvent {
Expand Down
1 change: 1 addition & 0 deletions agents/grpc/proto/nsolid_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package grpcagent;
service NSolidService {
rpc Command (stream CommandResponse) returns (stream CommandRequest) {}
rpc ExportAsset (stream Asset) returns (EventResponse) {}
rpc ExportContinuousProfile (stream Asset) returns (EventResponse) {}
rpc ExportExit (ExitEvent) returns (EventResponse) {}
rpc ExportInfo (InfoEvent) returns (EventResponse) {}
rpc ExportMetrics (MetricsEvent) returns (EventResponse) {}
Expand Down
1 change: 1 addition & 0 deletions agents/grpc/proto/reconfigure.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ message ReconfigureBody {
repeated string tags = 9;
optional bool tracingEnabled = 10;
optional uint32 tracingModulesBlacklist = 11;
optional bool contCpuProfile = 12;
}

message ReconfigureEvent {
Expand Down
15 changes: 12 additions & 3 deletions agents/grpc/src/asset_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ AssetStream::AssetStream(
AssetStor&& stor,
std::weak_ptr<AssetStreamObserver> observer,
const std::string& agent_id,
const std::string& saas): observer_(observer),
stor_(std::move(stor)) {
const std::string& saas,
AssetStreamRpcType rpc_type): observer_(observer),
stor_(std::move(stor)) {
ASSERT_EQ(0, lock_.init(true));
context_.AddMetadata("nsolid-agent-id", agent_id);
if (!saas.empty()) {
context_.AddMetadata("nsolid-saas-token", saas);
}
stub->async()->ExportAsset(&context_, &event_response_, this);

// Call the appropriate RPC method based on the rpc_type parameter
if (rpc_type == EXPORT_CONTINUOUS_PROFILE) {
stub->async()->ExportContinuousProfile(&context_, &event_response_, this);
} else {
stub->async()->ExportAsset(&context_, &event_response_, this);
}

AddHold();
StartCall();
}
Expand Down Expand Up @@ -86,6 +94,7 @@ void AssetStream::Write(grpcagent::Asset&& asset) {

void AssetStream::WritesDone(bool) {
nsuv::ns_mutex::scoped_lock lock(lock_);
ASSERT(write_state_.write_done_called == false);
write_state_.write_done_called = true;
NextWrite();
}
Expand Down
9 changes: 8 additions & 1 deletion agents/grpc/src/asset_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ namespace grpc {
// Predeclarations
class AssetStream;

// RPC type enum for specifying which RPC method to use
enum AssetStreamRpcType {
EXPORT_ASSET,
EXPORT_CONTINUOUS_PROFILE
};

struct AssetStor {
ProfileType type;
uint64_t thread_id;
Expand All @@ -41,7 +47,8 @@ class AssetStream: public ::grpc::ClientWriteReactor<grpcagent::Asset> {
AssetStor&& stor,
std::weak_ptr<AssetStreamObserver> observer,
const std::string& agent_id,
const std::string& saas);
const std::string& saas,
AssetStreamRpcType rpc_type = EXPORT_ASSET);

~AssetStream();

Expand Down
Loading
Loading