Skip to content

Commit 2be1187

Browse files
committed
review comments
1 parent c5e1e14 commit 2be1187

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

opentelemetry-sdk/src/trace/sampler/jaeger_remote/rate_limit.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub(crate) struct LeakyBucket {
88
bucket_size: f64,
99
last_time: SystemTime,
1010
}
11+
use opentelemetry::otel_debug;
1112

1213
impl LeakyBucket {
1314
pub(crate) fn new(bucket_size: f64, span_per_sec: f64) -> LeakyBucket {
@@ -53,9 +54,9 @@ impl LeakyBucket {
5354
}
5455
}
5556
Err(err) => {
56-
opentelemetry::otel_debug!(
57+
otel_debug!(
5758
name: "JaegerRemoteSampler.LeakyBucket.ClockAdjustment",
58-
message = "jaeger remote sampler detected a rewind in system clock",
59+
message = "Jaeger remote sampler detected a rewind in system clock",
5960
reason = format!("{:?}", err),
6061
);
6162
true

opentelemetry-sdk/src/trace/sampler/jaeger_remote/sampler.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl JaegerRemoteSampler {
206206
Err(err_msg) => {
207207
otel_warn!(
208208
name: "JaegerRemoteSampler.UpdateStrategy.RequestFailed",
209-
message: "Failed to fetch the sampling strategy from the remote endpoint. The last successfully fetched configuration will be used if available; otherwise, the default sampler will be applied until a successful configuration fetch.",
209+
message= "Failed to fetch the sampling strategy from the remote endpoint. The last successfully fetched configuration will be used if available; otherwise, the default sampler will be applied until a successful configuration fetch.",
210210
reason = format!("{}", err_msg),
211211
);
212212
}

opentelemetry-sdk/src/trace/sampler/jaeger_remote/sampling_strategy.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::trace::sampler::sample_based_on_probability;
66
use opentelemetry::trace::{
77
SamplingDecision, SamplingResult, TraceContextExt, TraceId, TraceState,
88
};
9-
use opentelemetry::{otel_debug, otel_warn, Context};
9+
use opentelemetry::{otel_warn, Context};
1010
use std::collections::HashMap;
1111
use std::fmt::{Debug, Formatter};
1212
use std::sync::Mutex;
@@ -141,7 +141,7 @@ impl Inner {
141141
_ => {
142142
otel_warn!(
143143
name: "Sampler.JaegerRemote.InvalidStrategy",
144-
message: "Invalid sampling strategy received from the remote endpoint. Expected one of: OperationSampling, RateLimitingSampling, or ProbabilisticSampling. Continuing to use the previous strategy or default sampler until a successful update.",
144+
message = "Invalid sampling strategy received from the remote endpoint. Expected one of: OperationSampling, RateLimitingSampling, or ProbabilisticSampling. Continuing to use the previous strategy or default sampler until a successful update.",
145145
);
146146
None
147147
}

0 commit comments

Comments
 (0)