You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -3271,17 +3271,107 @@ Sampler configuration is available starting with .NET agent version 10.45.0
3271
3271
3272
3272
The .NET agent currently supports 4 different sampling algorithms that can be configured for use in distributed tracing:
3273
3273
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>
3278
3326
3279
3327
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.
3283
3328
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:
3285
3375
3286
3376
```xml
3287
3377
<distributedTracing ... >
@@ -3311,10 +3401,10 @@ For each of the sampler levels, one of the following sampler configurations can
3311
3401
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.
3312
3402
3313
3403
<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.
3315
3405
</Callout>
3316
3406
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:
0 commit comments