Skip to content

Commit b2d8ce6

Browse files
committed
review comment
1 parent f1cbe29 commit b2d8ce6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

opentelemetry-sdk/src/trace/config.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl Default for Config {
130130
Box::new(Sampler::TraceIdRatioBased(r))
131131
} else {
132132
otel_warn!(
133-
name: "Sampler.TraceIdRatio.InvalidArgument",
133+
name: "TracerProvider.Config.Sampler.InvalidArgument",
134134
message = "OTEL_TRACES_SAMPLER is set to 'traceidratio' but OTEL_TRACES_SAMPLER_ARG environment variable is missing or invalid. OTEL_TRACES_SAMPLER_ARG must be a valid float between 0.0 and 1.0 representing the desired sampling probability (0.0 = no traces sampled, 1.0 = all traces sampled, 0.5 = 50% of traces sampled). Falling back to default ratio: 1.0 (100% sampling)"
135135
);
136136
Box::new(Sampler::TraceIdRatioBased(1.0))
@@ -150,7 +150,7 @@ impl Default for Config {
150150
))))
151151
} else {
152152
otel_warn!(
153-
name: "Sampler.ParentBasedTraceIdRatio.InvalidArgument",
153+
name: "TracerProvider.Config.Sampler.InvalidArgument",
154154
message = "OTEL_TRACES_SAMPLER is set to 'parentbased_traceidratio' but OTEL_TRACES_SAMPLER_ARG environment variable is missing or invalid. OTEL_TRACES_SAMPLER_ARG must be a valid float between 0.0 and 1.0 representing the desired sampling probability (0.0 = no traces sampled, 1.0 = all traces sampled, 0.5 = 50% of traces sampled). Falling back to default ratio: 1.0 (100% sampling)"
155155
);
156156
Box::new(Sampler::ParentBased(Box::new(Sampler::TraceIdRatioBased(
@@ -160,28 +160,28 @@ impl Default for Config {
160160
}
161161
"parentbased_jaeger_remote" => {
162162
otel_warn!(
163-
name: "Sampler.ParentBasedJaegerRemote.Unsupported",
163+
name: "TracerProvider.Config.Sampler.Unsupported",
164164
message = "OTEL_TRACES_SAMPLER is set to 'parentbased_jaeger_remote' which is not implemented in this SDK version. Using fallback sampler: ParentBased(AlwaysOn). Configure an alternative sampler using OTEL_TRACES_SAMPLER"
165165
);
166166
Box::new(Sampler::ParentBased(Box::new(Sampler::AlwaysOn)))
167167
}
168168
"jaeger_remote" => {
169169
otel_warn!(
170-
name: "Sampler.JaegerRemote.Unsupported",
170+
name: "TracerProvider.Config.Sampler.Unsupported",
171171
message = "OTEL_TRACES_SAMPLER is set to 'jaeger_remote' which is implemented in this SDK version. Using fallback sampler: ParentBased(AlwaysOn). Configure an alternative sampler using OTEL_TRACES_SAMPLER"
172172
);
173173
Box::new(Sampler::ParentBased(Box::new(Sampler::AlwaysOn)))
174174
}
175175
"xray" => {
176176
otel_warn!(
177-
name: "Sampler.XRay.Unsupported",
177+
name: "TracerProvider.Config.Sampler.Unsupported",
178178
message = "OTEL_TRACES_SAMPLER is set to 'xray'. AWS X-Ray sampler is not implemented in this SDK version. Using fallback sampler: ParentBased(AlwaysOn). Configure an alternative sampler using OTEL_TRACES_SAMPLER"
179179
);
180180
Box::new(Sampler::ParentBased(Box::new(Sampler::AlwaysOn)))
181181
}
182182
s => {
183183
otel_warn!(
184-
name: "Sampler.Configuration.InvalidSamplerType",
184+
name: "TracerProvider.Config.Sampler.InvalidSamplerType",
185185
message = format!(
186186
"Unrecognized sampler type '{}' in OTEL_TRACES_SAMPLER environment variable. Valid values are: always_on, always_off, traceidratio, parentbased_always_on, parentbased_always_off, parentbased_traceidratio. Using fallback sampler: ParentBased(AlwaysOn)",
187187
s

0 commit comments

Comments
 (0)