Skip to content

Commit

Permalink
Merge pull request #248 from solarwinds/cc/NH-86046
Browse files Browse the repository at this point in the history
NH-86046: remove setting sample rate.
  • Loading branch information
cleverchuk authored Jul 29, 2024
2 parents 9b4aab9 + bd51d88 commit 56af6a5
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 36 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ subprojects {
opentelemetryJavaagent: "2.5.0",
bytebuddy : "1.12.10",
guava : "30.1-jre",
joboe : "10.0.8",
joboe : "10.0.9",
agent : "2.5.1", // the custom distro agent version
autoservice : "1.0.1",
caffeine : "2.9.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,23 +309,6 @@ public static void processConfigs(ConfigContainer configs) throws InvalidConfigE
configs.put(ConfigProperty.AGENT_LOGGING, false);
}

if (configs.containsProperty(ConfigProperty.AGENT_SAMPLE_RATE)) {
Integer sampleRateFromConfig = (Integer) configs.get(ConfigProperty.AGENT_SAMPLE_RATE);
if (sampleRateFromConfig < 0 || sampleRateFromConfig > Constants.SAMPLE_RESOLUTION) {
logger.warn(
ConfigProperty.AGENT_SAMPLE_RATE
+ ": Invalid argument value: "
+ sampleRateFromConfig
+ ": must be between 0 and "
+ Constants.SAMPLE_RESOLUTION);
throw new InvalidConfigException(
"Invalid "
+ ConfigProperty.AGENT_SAMPLE_RATE.getConfigFileKey()
+ " : "
+ sampleRateFromConfig);
}
}

TraceConfigs traceConfigs = null;
if (configs.containsProperty(ConfigProperty.AGENT_TRANSACTION_SETTINGS)) {
if (configs.containsProperty(ConfigProperty.AGENT_URL_SAMPLE_RATE)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public static SamplingConfiguration getSamplingConfiguration() {
if (samplingConfiguration == null) {
SamplingConfiguration.SamplingConfigurationBuilder samplingConfigurationBuilder =
SamplingConfiguration.builder()
.sampleRate((Integer) ConfigManager.getConfig(ConfigProperty.AGENT_SAMPLE_RATE))
.tracingMode((TracingMode) ConfigManager.getConfig(ConfigProperty.AGENT_TRACING_MODE))
.internalTransactionSettings(
(TraceConfigs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,23 +436,6 @@ public static void processConfigs(ConfigContainer configs) throws InvalidConfigE
configs.put(ConfigProperty.AGENT_LOGGING, false);
}

if (configs.containsProperty(ConfigProperty.AGENT_SAMPLE_RATE)) {
Integer sampleRateFromConfig = (Integer) configs.get(ConfigProperty.AGENT_SAMPLE_RATE);
if (sampleRateFromConfig < 0 || sampleRateFromConfig > Constants.SAMPLE_RESOLUTION) {
logger.warn(
ConfigProperty.AGENT_SAMPLE_RATE
+ ": Invalid argument value: "
+ sampleRateFromConfig
+ ": must be between 0 and "
+ Constants.SAMPLE_RESOLUTION);
throw new InvalidConfigException(
"Invalid "
+ ConfigProperty.AGENT_SAMPLE_RATE.getConfigFileKey()
+ " : "
+ sampleRateFromConfig);
}
}

if (configs.containsProperty(ConfigProperty.AGENT_SERVICE_KEY)
&& !((String) configs.get(ConfigProperty.AGENT_SERVICE_KEY)).isEmpty()) {
// Customer access key (UUID)
Expand Down
Binary file renamed libs/config-10.0.8.jar → libs/config-10.0.9.jar
Binary file not shown.
Binary file renamed libs/core-10.0.8.jar → libs/core-10.0.9.jar
Binary file not shown.
Binary file renamed libs/logging-10.0.8.jar → libs/logging-10.0.9.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 56af6a5

Please sign in to comment.