Skip to content

Commit 3d14ab8

Browse files
authored
Merge pull request #185085 from trask/application-insights-3.2.5-BETA-updates
Add new config options for Application Insights Java 3.2.5-BETA
2 parents d0cb834 + efab616 commit 3d14ab8

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,64 @@ To disable auto-collection of Micrometer metrics (including Spring Boot Actuator
312312
}
313313
```
314314

315+
## HTTP headers
316+
317+
Starting from 3.2.5-BETA, you can capture request and response headers on your server (request) telemetry:
318+
319+
```json
320+
{
321+
"preview": {
322+
"captureHttpServerHeaders": {
323+
"requestHeaders": [
324+
"My-Header-A"
325+
],
326+
"responseHeaders": [
327+
"My-Header-B"
328+
]
329+
}
330+
}
331+
}
332+
```
333+
334+
The header names are case-insensitive.
335+
336+
The examples above will be captured under property names `http.request.header.my_header_a` and
337+
`http.response.header.my_header_b`.
338+
339+
Similarly, you can capture request and response headers on your client (dependency) telemetry:
340+
341+
```json
342+
{
343+
"preview": {
344+
"captureHttpClientHeaders": {
345+
"requestHeaders": [
346+
"My-Header-C"
347+
],
348+
"responseHeaders": [
349+
"My-Header-D"
350+
]
351+
}
352+
}
353+
}
354+
```
355+
356+
Again, the header names are case-insensitive, and the examples above will be captured under property names
357+
`http.request.header.my_header_c` and `http.response.header.my_header_d`.
358+
359+
## Http server 4xx response codes
360+
361+
By default, http server requests that result in 4xx response codes are captured as errors.
362+
363+
Starting from version 3.2.5-BETA, you can change this behavior to capture them as success if you prefer:
364+
365+
```json
366+
{
367+
"preview": {
368+
"captureHttpServer4xxAsError": false
369+
}
370+
}
371+
```
372+
315373
## Suppressing specific auto-collected telemetry
316374

317375
Starting from version 3.0.3, specific auto-collected telemetry can be suppressed using these configuration options:
@@ -467,6 +525,10 @@ you can configure Application Insights Java 3.x to use an HTTP proxy:
467525
Application Insights Java 3.x also respects the global `https.proxyHost` and `https.proxyPort` system properties
468526
if those are set (and `http.nonProxyHosts` if needed).
469527

528+
Starting from 3.2.5-BETA, authenticated proxies are supported. You can add `"user"` and `"password"` under `"proxy"` in
529+
the json above (or if you are using the system properties above, you can add `https.proxyUser` and `https.proxyPassword`
530+
system properties).
531+
470532
## Self-diagnostics
471533

472534
"Self-diagnostics" refers to internal logging from Application Insights Java 3.x.

0 commit comments

Comments
 (0)