Skip to content

Commit d8ce756

Browse files
committed
Convert sampler type and sampler level descriptions to tables for clarity.
1 parent f624a71 commit d8ce756

File tree

1 file changed

+100
-10
lines changed

1 file changed

+100
-10
lines changed

src/content/docs/apm/agents/net-agent/configuration/net-agent-configuration.mdx

Lines changed: 100 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3271,17 +3271,107 @@ Sampler configuration is available starting with .NET agent version 10.45.0
32713271
32723272
The .NET agent currently supports 4 different sampling algorithms that can be configured for use in distributed tracing:
32733273
3274-
* **Adaptive Sampler** - this is the original sampling algorithm used by the .NET agent and is enabled by default. Sampling decisions are made at random, with the goal of retaining a configured number of samples per sampling period.
3275-
* **Trace Id Ratio Based Sampler** - this is an implementation of the Open Telemetry Trace Id Ratio Based Sampler which samples a configured percentage of traces based on the (randomly generated) Trace Id.
3276-
* **Always On Sampler** - as the name implies, this sampler wil sample every trace. Note that enabling this sampler can have an impact on application performance and will result in increased data ingest cost.
3277-
* **Always Off Sampler** - The opposite of Always On; this sampler does not sample any traces. Useful in very specfic cases.
3274+
<table>
3275+
<thead>
3276+
<tr>
3277+
<th>
3278+
<DNT>
3279+
**Sampler Type**
3280+
</DNT>
3281+
</th>
3282+
3283+
<th>
3284+
<DNT>
3285+
**Description**
3286+
</DNT>
3287+
</th>
3288+
</tr>
3289+
</thead>
3290+
3291+
<tbody>
3292+
<tr>
3293+
<td>
3294+
Adaptive Sampler
3295+
</td>
3296+
<td>
3297+
The original sampling algorithm used by the .NET agent and is enabled by default. Sampling decisions are made at random, with the goal of retaining a configured number of samples per sampling period.
3298+
</td>
3299+
</tr>
3300+
<tr>
3301+
<td>
3302+
Trace Id Ratio Based Sampler
3303+
</td>
3304+
<td>
3305+
An implementation of the Open Telemetry Trace Id Ratio Based Sampler which samples a configured percentage of traces based on the (randomly generated) Trace Id.
3306+
</td>
3307+
</tr>
3308+
<tr>
3309+
<td>
3310+
Always On Sampler
3311+
</td>
3312+
<td>
3313+
As the name implies, this sampler wil sample every trace. Note that enabling this sampler can have an impact on application performance and will result in increased data ingest.
3314+
</td>
3315+
</tr>
3316+
<tr>
3317+
<td>
3318+
Always Off Sampler
3319+
</td>
3320+
<td>
3321+
The opposite of Always On; this sampler does not sample any traces. Useful in very specfic cases.
3322+
</td>
3323+
</tr>
3324+
</tbody>
3325+
</table>
32783326
32793327
The supported samplers can be configured at multiple levels:
3280-
* **Root** - this is the sampler that is applied at the beginning of a trace. By default, the Adaptive Sampler is configured as the Root sampler.
3281-
* **Remote Parent Sampled** - this is the sampler that is applied when the trace has a remote parent that has been sampled. It can be configured to use, for example, the Always On sampler to ensure that all traces in the current application are sampled.
3282-
* **Remote Parent Not Sampled** - this is the sampler that is applied when a trace has a remote parent that is not sampled.
32833328
3284-
The sampler configuration element is a child of the `<distributedTracing>` element.
3329+
<table>
3330+
<thead>
3331+
<tr>
3332+
<th>
3333+
<DNT>
3334+
**Sampler Level**
3335+
</DNT>
3336+
</th>
3337+
3338+
<th>
3339+
<DNT>
3340+
**Description**
3341+
</DNT>
3342+
</th>
3343+
</tr>
3344+
</thead>
3345+
3346+
<tbody>
3347+
<tr>
3348+
<td>
3349+
Root
3350+
</td>
3351+
<td>
3352+
This is the sampler that is applied at the beginning of a trace. By default, the Adaptive Sampler is configured as the Root sampler.
3353+
</td>
3354+
</tr>
3355+
<tr>
3356+
<td>
3357+
Remote Parent Sampled
3358+
</td>
3359+
<td>
3360+
This is the sampler that is applied when the trace has a remote parent (i.e., the trace originated in an upstream service) that has been sampled. It can be configured to use, for example, the Always On sampler to ensure that all traces in the current application are sampled.
3361+
</td>
3362+
</tr>
3363+
<tr>
3364+
<td>
3365+
Remote Parent Not Sampled
3366+
</td>
3367+
<td>
3368+
This is the sampler that is applied when a trace has a remote parent (i.e., the trace originated in an upstream service) that was NOT sampled.
3369+
</td>
3370+
</tr>
3371+
</tbody>
3372+
</table>
3373+
3374+
The `<sampler>` configuration element is a child of the `<distributedTracing>` element and is structured as follows:
32853375
32863376
```xml
32873377
<distributedTracing ... >
@@ -3311,10 +3401,10 @@ For each of the sampler levels, one of the following sampler configurations can
33113401
The `<traceIdRatioBased>` element has a required `ratio` attribute, which is a value between 0.0 and 1.0 specifying the percentage of traces that should be sampled.
33123402
33133403
<Callout variant="important">
3314-
By default, the **Adaptive Sampler** is used if there is no other configuration specified at a particular sampler level.
3404+
The **Adaptive Sampler** will be used if there is no configuration specified at a particular sampler level or if the configuration element for that level is not specified at all.
33153405
</Callout>
33163406
3317-
The following environment variables can also be used to configure the distributed trace sampler at the various sampler levels, specifying one of the possible values for the sampler type:
3407+
The following environment variables can be used to configure the distributed trace sampler at the various sampler levels, specifying one of the possible values for the sampler type:
33183408
```
33193409
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_ROOT= default | adaptive | traceIdRatioBased | alwaysOn | alwaysOff
33203410
NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_REMOTE_PARENT_SAMPLED = default | adaptive | traceIdRatioBased | alwaysOn | alwaysOff

0 commit comments

Comments
 (0)