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

NH-86046: remove setting sample rate. #248

Merged
merged 1 commit into from
Jul 29, 2024
Merged
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
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 not shown.
Binary file not shown.
Binary file not shown.