Skip to content

Commit 39d960e

Browse files
authored
[docs-traces] Added version info to the OTEL_TRACES_SAMPLER doc (#5492)
1 parent 2e30089 commit 39d960e

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

docs/trace/customizing-the-sdk/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ var tracerProvider = Sdk.CreateTracerProviderBuilder()
363363
.Build();
364364
```
365365

366-
It is also possible to configure the sampler by using the following
367-
environmental variables:
366+
If using `1.8.0-rc.1` or newer it is also possible to configure the sampler by
367+
using the following environmental variables:
368368

369369
| Environment variable | Description |
370370
| -------------------------- | -------------------------------------------------- |

src/OpenTelemetry/Trace/TracerProviderSdk.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,7 @@ protected override void Dispose(bool disposing)
407407

408408
private static Sampler GetSampler(IConfiguration configuration, Sampler? stateSampler)
409409
{
410-
Sampler? sampler = null;
411-
412-
if (stateSampler != null)
413-
{
414-
sampler = stateSampler;
415-
}
410+
var sampler = stateSampler;
416411

417412
if (configuration.TryGetStringValue(TracesSamplerConfigKey, out var configValue))
418413
{

0 commit comments

Comments
 (0)