Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private saveChanges(query: Partial): void {
/** restore the config to default */
if (query.change === 'restore_default') {
tracing.tracer.sampler = SamplerBuilder.getSampler(
this.defaultConfig!.samplingRate
);
return;
}
/** change the sampling probability value */
if (query.samplingprobability) {
tracing.tracer.sampler = SamplerBuilder.getSampler(
query.samplingprobability
);
}
}
private saveChanges(query: Partial): void {
/** restore the config to default */
if (query.change === 'restore_default') {
tracing.tracer.sampler = SamplerBuilder.getSampler(
this.defaultConfig!.samplingRate
);
return;
}
/** change the sampling probability value */
if (query.samplingprobability) {
tracing.tracer.sampler = SamplerBuilder.getSampler(
query.samplingprobability
);
}
}