-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add service for dynamic config #61
Draft
shashank11p
wants to merge
1
commit into
main
Choose a base branch
from
addDynamicConfigService
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
syntax = "proto3"; | ||
|
||
package org.hypertrace.agent.config; | ||
|
||
import "google/protobuf/wrappers.proto"; | ||
|
||
option go_package = "github.com/hypertrace/goagent/config"; | ||
option java_package = "org.hypertrace.agent.config"; | ||
|
||
import "config.proto"; | ||
|
||
service ConfigurationService { | ||
// InitialConfiguration returns the initial configuration for an agent. | ||
// It should be called by agents only if config file is not specified by user. | ||
rpc InitialConfiguration(InitialConfigurationRequest) returns (InitialConfigurationResponse) {} | ||
|
||
// UpdateConfiguration returns the configs that can be dynamically updated in agents | ||
rpc UpdateConfiguration(UpdateConfigurationRequest) returns (UpdateConfigurationResponse) {} | ||
} | ||
|
||
// InitialConfigurationRequest has information about the agent | ||
message InitialConfigurationRequest { | ||
// hostname on which the agent is running | ||
string hostname = 1; | ||
// if running in a containerized environment the container id in which the agent is running | ||
string container_id = 2; | ||
// a map of identifiers the configuration service can use to apply a specific configuration to an agent | ||
map<string, string> identifiers = 3; | ||
} | ||
|
||
// InitialConfigurationResponse has the initial config that will be used by agent at startup | ||
message InitialConfigurationResponse { | ||
// the timestamp associated with the configuration. This is the time | ||
// the configuration was persisted, not when it was sent. The timestamp | ||
// should only change when the persisted configuration has changed. | ||
google.protobuf.Int32Value timestamp = 1; | ||
// configuration to be applied to the agent at initialization | ||
AgentConfig agent_config = 2; | ||
} | ||
|
||
message UpdateConfigurationRequest { | ||
// the timestamp of the current configuration | ||
google.protobuf.Int32Value timestamp = 1; | ||
} | ||
|
||
// not all configuration can be changed after the agent has started | ||
// these are the properties which can be dynamically configured | ||
// without restarting the agent | ||
message UpdateConfigurationResponse { | ||
// the timestamp associated with the configuration | ||
// if there are no configuration change, this value will | ||
// equal UpdateConfigurationRequest.timestamp | ||
google.protobuf.Int32Value timestamp = 1; | ||
// enable or disable the agent. This will not remove | ||
// any instrumentation when set to false, but the agent | ||
// will turn stop reporting spans, metrics etc | ||
google.protobuf.BoolValue enabled = 2; | ||
// data capture configuration which applies to all agents | ||
DataCapture data_capture = 3; | ||
// java agent specific configuration | ||
JavaAgent java_agent = 4; | ||
// custom_data_capture_endpoints are the custom endpoints with respective data capture rules | ||
repeated CustomDataCaptureEndpoint custom_data_capture_endpoints = 5; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not using
service_name
here as a user will anyways define it in env var or system property and they have higher preference so it will be updated by agents. Do we have any other use case for sendingservice_name
?