Skip to content

Commit d96e10c

Browse files
authored
Update sampling overrides
1 parent 24f04d3 commit d96e10c

File tree

1 file changed

+64
-74
lines changed

1 file changed

+64
-74
lines changed

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

Lines changed: 64 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.reviewer: mmcc
1111
# Sampling overrides (preview) - Azure Monitor Application Insights for Java
1212

1313
> [!NOTE]
14-
> The sampling overrides feature is in preview, starting from 3.0.3.
14+
> The sampling overrides feature is in GA, starting from 3.5.0.
1515
1616
Sampling overrides allow you to override the [default sampling percentage](./java-standalone-config.md#sampling),
1717
for example:
@@ -43,26 +43,22 @@ To begin, create a configuration file named *applicationinsights.json*. Save it
4343
"connectionString": "...",
4444
"sampling": {
4545
"percentage": 10
46-
},
47-
"preview": {
48-
"sampling": {
49-
"overrides": [
50-
{
51-
"telemetryType": "request",
52-
"attributes": [
53-
...
54-
],
55-
"percentage": 0
56-
},
57-
{
58-
"telemetryType": "request",
59-
"attributes": [
60-
...
61-
],
62-
"percentage": 100
63-
}
64-
]
65-
}
46+
"overrides": [
47+
{
48+
"telemetryType": "request",
49+
"attributes": [
50+
...
51+
],
52+
"percentage": 0
53+
},
54+
{
55+
"telemetryType": "request",
56+
"attributes": [
57+
...
58+
],
59+
"percentage": 100
60+
}
61+
]
6662
}
6763
}
6864
```
@@ -100,22 +96,20 @@ This example also suppresses collecting any downstream spans (dependencies) that
10096
```json
10197
{
10298
"connectionString": "...",
103-
"preview": {
104-
"sampling": {
105-
"overrides": [
106-
{
107-
"telemetryType": "request",
108-
"attributes": [
109-
{
110-
"key": "http.url",
111-
"value": "https?://[^/]+/health-check",
112-
"matchType": "regexp"
113-
}
114-
],
115-
"percentage": 0
116-
}
117-
]
118-
}
99+
"sampling": {
100+
"overrides": [
101+
{
102+
"telemetryType": "request",
103+
"attributes": [
104+
{
105+
"key": "http.url",
106+
"value": "https?://[^/]+/health-check",
107+
"matchType": "regexp"
108+
}
109+
],
110+
"percentage": 0
111+
}
112+
]
119113
}
120114
}
121115
```
@@ -127,27 +121,25 @@ This example suppresses collecting telemetry for all `GET my-noisy-key` redis ca
127121
```json
128122
{
129123
"connectionString": "...",
130-
"preview": {
131-
"sampling": {
132-
"overrides": [
133-
{
134-
"telemetryType": "dependency",
135-
"attributes": [
136-
{
137-
"key": "db.system",
138-
"value": "redis",
139-
"matchType": "strict"
140-
},
141-
{
142-
"key": "db.statement",
143-
"value": "GET my-noisy-key",
144-
"matchType": "strict"
145-
}
146-
],
147-
"percentage": 0
148-
}
149-
]
150-
}
124+
"sampling": {
125+
"overrides": [
126+
{
127+
"telemetryType": "dependency",
128+
"attributes": [
129+
{
130+
"key": "db.system",
131+
"value": "redis",
132+
"matchType": "strict"
133+
},
134+
{
135+
"key": "db.statement",
136+
"value": "GET my-noisy-key",
137+
"matchType": "strict"
138+
}
139+
],
140+
"percentage": 0
141+
}
142+
]
151143
}
152144
}
153145
```
@@ -166,22 +158,20 @@ those are also collected for all '/login' requests.
166158
"sampling": {
167159
"percentage": 10
168160
},
169-
"preview": {
170-
"sampling": {
171-
"overrides": [
172-
{
173-
"telemetryType": "request",
174-
"attributes": [
175-
{
176-
"key": "http.url",
177-
"value": "https?://[^/]+/login",
178-
"matchType": "regexp"
179-
}
180-
],
181-
"percentage": 100
182-
}
183-
]
184-
}
161+
"sampling": {
162+
"overrides": [
163+
{
164+
"telemetryType": "request",
165+
"attributes": [
166+
{
167+
"key": "http.url",
168+
"value": "https?://[^/]+/login",
169+
"matchType": "regexp"
170+
}
171+
],
172+
"percentage": 100
173+
}
174+
]
185175
}
186176
}
187177
```

0 commit comments

Comments
 (0)