Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions agents/grpc/proto/reconfigure.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ message ReconfigureBody {
optional uint32 tracingModulesBlacklist = 11;
optional bool contCpuProfile = 12;
optional bool assetsEnabled = 13;
optional double traceSampleRate = 14;
}

message ReconfigureEvent {
Expand Down
9 changes: 9 additions & 0 deletions agents/grpc/src/grpc_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ void PopulateReconfigureEvent(grpcagent::ReconfigureEvent* reconfigure_event,
if (it != config.end()) {
body->set_assetsenabled(*it);
}

it = config.find("traceSampleRate");
if (it != config.end()) {
body->set_tracesamplerate(*it);
}
}

void PopulateStartupTimesEvent(grpcagent::StartupTimesEvent* st_events,
Expand Down Expand Up @@ -1758,6 +1763,10 @@ void GrpcAgent::reconfigure(const grpcagent::CommandRequest& request) {
out["assetsEnabled"] = body.assetsenabled();
}

if (body.has_tracesamplerate()) {
out["traceSampleRate"] = body.tracesamplerate();
}

DebugJSON("Reconfigure out: \n%s\n", out);

UpdateConfig(out.dump());
Expand Down
83 changes: 52 additions & 31 deletions agents/grpc/src/proto/reconfigure.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 49 additions & 7 deletions agents/grpc/src/proto/reconfigure.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading