Skip to content

Commit 472f19b

Browse files
authored
Merge pull request #191552 from trask/regexp-clarification
Regexp clarification
2 parents 47962d4 + 73560ea commit 472f19b

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

articles/azure-monitor/app/java-standalone-sampling-overrides.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ To begin, create a configuration file named *applicationinsights.json*. Save it
6969
When a span is started, the attributes present on the span at that time are used to check if any of the sampling
7070
overrides match.
7171

72+
Matches can be either `strict` or `regexp`. Regular expression matches are performed against the entire attribute value,
73+
so if you want to match a value that contains `abc` anywhere in it, then you need to use `.*abc.*`.
74+
7275
If one of the sampling overrides match, then its sampling percentage is used to decide whether to sample the span or
7376
not.
7477

articles/azure-monitor/app/java-standalone-telemetry-processors.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ To configure this option, under `include` or `exclude` (or both), specify at lea
236236
The include-exclude configuration allows more than one specified condition.
237237
All specified conditions must evaluate to true to result in a match.
238238

239-
* **Required field**: `matchType` controls how items in `spanNames` arrays and `attributes` arrays are interpreted. Possible values are `regexp` and `strict`.
239+
* **Required field**: `matchType` controls how items in `spanNames` arrays and `attributes` arrays are interpreted.
240+
Possible values are `regexp` and `strict`. Regular expression matches are performed against the entire attribute value,
241+
so if you want to match a value that contains `abc` anywhere in it, then you need to use `.*abc.*`.
240242

241243
* **Optional fields**:
242244
* `spanNames` must match at least one of the items.
@@ -383,7 +385,9 @@ To configure this option, under `include` or `exclude` (or both), specify at lea
383385
The include-exclude configuration allows more than one specified condition.
384386
All specified conditions must evaluate to true to result in a match.
385387

386-
* **Required field**: `matchType` controls how items in `spanNames` arrays and `attributes` arrays are interpreted. Possible values are `regexp` and `strict`.
388+
* **Required field**: `matchType` controls how items in `spanNames` arrays and `attributes` arrays are interpreted.
389+
Possible values are `regexp` and `strict`. Regular expression matches are performed against the entire attribute value,
390+
so if you want to match a value that contains `abc` anywhere in it, then you need to use `.*abc.*`.
387391

388392
* **Optional fields**:
389393
* `spanNames` must match at least one of the items.
@@ -506,7 +510,9 @@ The include-exclude configuration allows more than one specified condition.
506510
All specified conditions must evaluate to true to result in a match.
507511

508512
* **Required field**:
509-
* `matchType` controls how items in `attributes` arrays are interpreted. Possible values are `regexp` and `strict`.
513+
* `matchType` controls how items in `attributes` arrays are interpreted. Possible values are `regexp` and `strict`.
514+
Regular expression matches are performed against the entire attribute value,
515+
so if you want to match a value that contains `abc` anywhere in it, then you need to use `.*abc.*`.
510516
* `attributes` specifies the list of attributes to match. All of these attributes must match exactly to result in a match.
511517

512518
> [!NOTE]
@@ -566,7 +572,9 @@ To configure this option, under `exclude`, specify the `matchType` one or more `
566572

567573
* **Required field**:
568574
* `matchType` controls how items in `metricNames` are matched. Possible values are `regexp` and `strict`.
569-
* `metricNames` must match at least one of the items.
575+
Regular expression matches are performed against the entire attribute value,
576+
so if you want to match a value that contains `abc` anywhere in it, then you need to use `.*abc.*`.
577+
* `metricNames` must match at least one of the items.
570578

571579
### Sample usage
572580

0 commit comments

Comments
 (0)