@@ -11,7 +11,7 @@ ms.reviewer: mmcc
11
11
# Sampling overrides (preview) - Azure Monitor Application Insights for Java
12
12
13
13
> [ !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 .
15
15
16
16
Sampling overrides allow you to override the [ default sampling percentage] ( ./java-standalone-config.md#sampling ) ,
17
17
for example:
@@ -43,26 +43,22 @@ To begin, create a configuration file named *applicationinsights.json*. Save it
43
43
"connectionString" : " ..." ,
44
44
"sampling" : {
45
45
"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
+ ]
66
62
}
67
63
}
68
64
```
@@ -100,22 +96,20 @@ This example also suppresses collecting any downstream spans (dependencies) that
100
96
``` json
101
97
{
102
98
"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
+ ]
119
113
}
120
114
}
121
115
```
@@ -127,27 +121,25 @@ This example suppresses collecting telemetry for all `GET my-noisy-key` redis ca
127
121
``` json
128
122
{
129
123
"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
+ ]
151
143
}
152
144
}
153
145
```
@@ -166,22 +158,20 @@ those are also collected for all '/login' requests.
166
158
"sampling" : {
167
159
"percentage" : 10
168
160
},
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
+ ]
185
175
}
186
176
}
187
177
```
0 commit comments