Skip to content

Commit

Permalink
[docs-traces] Added version info to the OTEL_TRACES_SAMPLER doc (#5492)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch committed Mar 29, 2024
1 parent 2e30089 commit 39d960e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/trace/customizing-the-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ var tracerProvider = Sdk.CreateTracerProviderBuilder()
.Build();
```

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

| Environment variable | Description |
| -------------------------- | -------------------------------------------------- |
Expand Down
7 changes: 1 addition & 6 deletions src/OpenTelemetry/Trace/TracerProviderSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,7 @@ protected override void Dispose(bool disposing)

private static Sampler GetSampler(IConfiguration configuration, Sampler? stateSampler)
{
Sampler? sampler = null;

if (stateSampler != null)
{
sampler = stateSampler;
}
var sampler = stateSampler;

if (configuration.TryGetStringValue(TracesSamplerConfigKey, out var configValue))
{
Expand Down

0 comments on commit 39d960e

Please sign in to comment.