Skip to content

Commit e395a8b

Browse files
committed
Update to 3.4.0
1 parent fa0bb00 commit e395a8b

File tree

2 files changed

+36
-69
lines changed

2 files changed

+36
-69
lines changed

articles/azure-monitor/app/java-standalone-config.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,12 @@ Furthermore, sampling is trace ID based, to help ensure consistent sampling deci
140140

141141
### Rate-Limited Sampling
142142

143-
Starting from 3.4.0-BETA, rate-limited sampling is available, and is now the default.
143+
Starting from 3.4.0, rate-limited sampling is available, and is now the default.
144144

145145
If no sampling has been configured, the default is now rate-limited sampling configured to capture at most
146-
(approximately) 5 requests per second. This replaces the prior default which was to capture all requests.
146+
(approximately) 5 requests per second, along with all the dependencies and logs on those requests.
147+
148+
This replaces the prior default which was to capture all requests.
147149
If you still wish to capture all requests, use [fixed-percentage sampling](#fixed-percentage-sampling) and set the
148150
sampling percentage to 100.
149151

@@ -158,15 +160,15 @@ Here is an example how to set the sampling to capture at most (approximately) 1
158160
```json
159161
{
160162
"sampling": {
161-
"limitPerSecond": 1.0
163+
"requestsPerSecond": 1.0
162164
}
163165
}
164166
```
165167

166-
Note that `limitPerSecond` can be a decimal, so you can configure it to capture less than one request per second if you
167-
wish.
168+
Note that `requestsPerSecond` can be a decimal, so you can configure it to capture less than one request per second if you wish.
169+
For example, a value of `0.5` means capture at most 1 request every 2 seconds.
168170

169-
You can also set the sampling percentage using the environment variable `APPLICATIONINSIGHTS_SAMPLING_LIMIT_PER_SECOND`
171+
You can also set the sampling percentage using the environment variable `APPLICATIONINSIGHTS_SAMPLING_REQUESTS_PER_SECOND`
170172
(which will then take precedence over rate limit specified in the json configuration).
171173

172174
### Fixed-Percentage Sampling
@@ -266,7 +268,7 @@ Starting from version 3.2.0, if you want to set a custom dimension programmatica
266268

267269
## Connection string overrides (preview)
268270

269-
This feature is in preview, starting from 3.4.0-BETA.
271+
This feature is in preview, starting from 3.4.0.
270272

271273
Connection string overrides allow you to override the [default connection string](#connection-string), for example:
272274
* Set one connection string for one http path prefix `/myapp1`.
@@ -462,7 +464,7 @@ To disable auto-collection of Micrometer metrics (including Spring Boot Actuator
462464

463465
Literal values in JDBC queries are masked by default in order to avoid accidentally capturing sensitive data.
464466

465-
Starting from 3.4.0-BETA, this behavior can be disabled if desired, e.g.
467+
Starting from 3.4.0, this behavior can be disabled if desired, e.g.
466468

467469
```json
468470
{
@@ -476,6 +478,24 @@ Starting from 3.4.0-BETA, this behavior can be disabled if desired, e.g.
476478
}
477479
```
478480

481+
## Mongo query masking
482+
483+
Literal values in Mongo queries are masked by default in order to avoid accidentally capturing sensitive data.
484+
485+
Starting from 3.4.0, this behavior can be disabled if desired, e.g.
486+
487+
```json
488+
{
489+
"instrumentation": {
490+
"mongo": {
491+
"masking": {
492+
"enabled": false
493+
}
494+
}
495+
}
496+
}
497+
```
498+
479499
## HTTP headers
480500

481501
Starting from version 3.3.0, you can capture request and response headers on your server (request) telemetry:

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

Lines changed: 8 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ To begin, create a configuration file named *applicationinsights.json*. Save it
4848
"sampling": {
4949
"overrides": [
5050
{
51+
"telemetryKind": "request",
5152
"attributes": [
5253
...
5354
],
5455
"percentage": 0
5556
},
5657
{
58+
"telemetryKind": "request",
5759
"attributes": [
5860
...
5961
],
@@ -65,41 +67,11 @@ To begin, create a configuration file named *applicationinsights.json*. Save it
6567
}
6668
```
6769

68-
> [!NOTE]
69-
> Starting from 3.4.0-BETA, `telemetryKind` of `request`, `dependency`, `trace` (log), or `exception` is supported
70-
> (and should be set) on all sampling overrides, e.g.
71-
> ```json
72-
> {
73-
> "connectionString": "...",
74-
> "sampling": {
75-
> "percentage": 10
76-
> },
77-
> "preview": {
78-
> "sampling": {
79-
> "overrides": [
80-
> {
81-
> "telemetryKind": "request",
82-
> "attributes": [
83-
> ...
84-
> ],
85-
> "percentage": 0
86-
> },
87-
> {
88-
> "telemetryKind": "request",
89-
> "attributes": [
90-
> ...
91-
> ],
92-
> "percentage": 100
93-
> }
94-
> ]
95-
> }
96-
> }
97-
> }
98-
> ```
99-
10070
## How it works
10171

102-
When a span is started, the attributes present on the span at that time are used to check if any of the sampling
72+
`telemetryKind` must be one of `request`, `dependency`, `trace` (log), or `exception`.
73+
74+
When a span is started, the type of span and the attributes present on it at that time are used to check if any of the sampling
10375
overrides match.
10476

10577
Matches can be either `strict` or `regexp`. Regular expression matches are performed against the entire attribute value,
@@ -118,31 +90,6 @@ If no sampling overrides match:
11890
[top-level sampling configuration](./java-standalone-config.md#sampling) is used.
11991
* If this is not the first span in the trace, then the parent sampling decision is used.
12092

121-
> [!NOTE]
122-
> Starting from 3.4.0-BETA, sampling overrides do not apply to "standalone" telemetry by default. Standalone telemetry
123-
> is any telemetry that is not associated with a request, e.g. startup logs.
124-
> You can make a sampling override apply to standalone telemetry by including the attribute
125-
> `includingStandaloneTelemetry` in the sampling override, e.g.
126-
> ```json
127-
> {
128-
> "connectionString": "...",
129-
> "preview": {
130-
> "sampling": {
131-
> "overrides": [
132-
> {
133-
> "telemetryKind": "dependency",
134-
> "includingStandaloneTelemetry": true,
135-
> "attributes": [
136-
> ...
137-
> ],
138-
> "percentage": 0
139-
> }
140-
> ]
141-
> }
142-
> }
143-
> }
144-
> ```
145-
14693
## Example: Suppress collecting telemetry for health checks
14794

14895
This will suppress collecting telemetry for all requests to `/health-checks`.
@@ -157,6 +104,7 @@ This will also suppress collecting any downstream spans (dependencies) that woul
157104
"sampling": {
158105
"overrides": [
159106
{
107+
"telemetryKind": "request",
160108
"attributes": [
161109
{
162110
"key": "http.url",
@@ -183,6 +131,7 @@ This will suppress collecting telemetry for all `GET my-noisy-key` redis calls.
183131
"sampling": {
184132
"overrides": [
185133
{
134+
"telemetryKind": "dependency",
186135
"attributes": [
187136
{
188137
"key": "db.system",
@@ -203,9 +152,6 @@ This will suppress collecting telemetry for all `GET my-noisy-key` redis calls.
203152
}
204153
```
205154

206-
> [!NOTE]
207-
> Starting from 3.4.0-BETA, `telemetryKind` is supported (and recommended) on all sampling overrides, e.g.
208-
209155
## Example: Collect 100% of telemetry for an important request type
210156

211157
This will collect 100% of telemetry for `/login`.
@@ -224,6 +170,7 @@ those will also be collected for all '/login' requests.
224170
"sampling": {
225171
"overrides": [
226172
{
173+
"telemetryKind": "request",
227174
"attributes": [
228175
{
229176
"key": "http.url",

0 commit comments

Comments
 (0)