You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/java-in-process-agent.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,23 +30,29 @@ This section shows you how to download the auto-instrumentation jar file.
30
30
31
31
#### Download the jar file
32
32
33
-
Download the [applicationinsights-agent-3.3.1.jar](https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.3.1/applicationinsights-agent-3.3.1.jar) file.
33
+
Download the [applicationinsights-agent-3.4.0.jar](https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.4.0/applicationinsights-agent-3.4.0.jar) file.
34
34
35
35
> [!WARNING]
36
-
>
37
-
> If you're upgrading from 3.2.x:
38
-
>
39
-
> - Starting from 3.3.0, `LoggingLevel` is not captured by default as part of Traces' custom dimension since that data is already captured in the `SeverityLevel` field. For details on how to re-enable this if needed, please see the [config options](./java-standalone-config.md#logginglevel)
36
+
>
37
+
> If you are upgrading from an earlier 3.x version,
38
+
>
39
+
> Starting from 3.4.0:
40
+
>
41
+
> - Rate-limited sampling is now the default (if you have not configured a fixed percentage previously). By default, it will capture at most around 5 requests per second (along with their dependencies, traces and custom events). See [fixed-percentage sampling](./java-standalone-config.md#fixed-percentage-sampling) if you wish to revert to the previous behavior of capturing 100% of requests.
42
+
>
43
+
> Starting from 3.3.0:
44
+
>
45
+
> -`LoggingLevel` is not captured by default as part of Traces' custom dimension since that data is already captured in the `SeverityLevel` field. For details on how to re-enable this if needed, please see the [config options](./java-standalone-config.md#logginglevel)
40
46
> - Exception records are no longer recorded for failed dependencies, they are only recorded for failed requests.
41
47
>
42
-
> If you're upgrading from 3.1.x:
48
+
> Starting from 3.2.0:
43
49
>
44
-
> - Starting from 3.2.0, controller "InProc" dependencies are not captured by default. For details on how to enable this, please see the [config options](./java-standalone-config.md#autocollect-inproc-dependencies-preview).
50
+
> -Controller "InProc" dependencies are no longer captured by default. For details on how to re-enable these, please see the [config options](./java-standalone-config.md#autocollect-inproc-dependencies-preview).
45
51
> - Database dependency names are now more concise with the full (sanitized) query still present in the `data` field. HTTP dependency names are now more descriptive.
46
52
> This change can affect custom dashboards or alerts if they relied on the previous values.
47
53
> For details, see the [3.2.0 release notes](https://github.com/microsoft/ApplicationInsights-Java/releases/tag/3.2.0).
48
54
>
49
-
> If you're upgrading from 3.0.x:
55
+
> Starting from 3.1.0:
50
56
>
51
57
> - The operation names and request telemetry names are now prefixed by the HTTP method, such as `GET` and `POST`.
52
58
> This change can affect custom dashboards or alerts if they relied on the previous values.
@@ -56,7 +62,7 @@ Download the [applicationinsights-agent-3.3.1.jar](https://github.com/microsoft/
56
62
57
63
#### Point the JVM to the jar file
58
64
59
-
Add `-javaagent:"path/to/applicationinsights-agent-3.3.1.jar"` to your application's JVM args.
65
+
Add `-javaagent:"path/to/applicationinsights-agent-3.4.0.jar"` to your application's JVM args.
60
66
61
67
> [!TIP]
62
68
> For help with configuring your application's JVM args, see [Tips for updating your JVM args](./java-standalone-arguments.md).
@@ -74,7 +80,7 @@ Add `-javaagent:"path/to/applicationinsights-agent-3.3.1.jar"` to your applicati
74
80
APPLICATIONINSIGHTS_CONNECTION_STRING=<Copy connection string from Application Insights Resource Overview>
75
81
```
76
82
77
-
- Or you can create a configuration file named `applicationinsights.json`. Place it in the same directory as `applicationinsights-agent-3.3.1.jar` with the following content:
83
+
- Or you can create a configuration file named `applicationinsights.json`. Place it in the same directory as `applicationinsights-agent-3.4.0.jar` with the following content:
If you're using the *exec* form, add the parameter `-javaagent:"path/to/applicationinsights-agent-3.3.1.jar"` to the parameter list somewhere before the `"-jar"` parameter, for example:
26
+
If you're using the *exec* form, add the parameter `-javaagent:"path/to/applicationinsights-agent-3.4.0.jar"` to the parameter list somewhere before the `"-jar"` parameter, for example:
If you installed Tomcat via download and unzip from [https://tomcat.apache.org](https://tomcat.apache.org), then you should have a file `<tomcat>/bin/catalina.sh`. Create a new file in the same directory named `<tomcat>/bin/setenv.sh` with the following content:
If the file `<tomcat>/bin/setenv.sh` already exists, then modify that file and add `-javaagent:path/to/applicationinsights-agent-3.3.1.jar` to `CATALINA_OPTS`.
39
+
If the file `<tomcat>/bin/setenv.sh` already exists, then modify that file and add `-javaagent:path/to/applicationinsights-agent-3.4.0.jar` to `CATALINA_OPTS`.
40
40
41
41
42
42
## Tomcat 8 (Windows)
@@ -46,36 +46,36 @@ If the file `<tomcat>/bin/setenv.sh` already exists, then modify that file and a
46
46
Locate the file `<tomcat>/bin/catalina.bat`. Create a new file in the same directory named `<tomcat>/bin/setenv.bat` with the following content:
47
47
48
48
```
49
-
set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-3.3.1.jar
49
+
set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-3.4.0.jar
50
50
```
51
51
52
52
Quotes aren't necessary, but if you want to include them, the proper placement is:
53
53
54
54
```
55
-
set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-3.3.1.jar"
55
+
set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-3.4.0.jar"
56
56
```
57
57
58
-
If the file `<tomcat>/bin/setenv.bat` already exists, just modify that file and add `-javaagent:path/to/applicationinsights-agent-3.3.1.jar` to `CATALINA_OPTS`.
58
+
If the file `<tomcat>/bin/setenv.bat` already exists, just modify that file and add `-javaagent:path/to/applicationinsights-agent-3.4.0.jar` to `CATALINA_OPTS`.
59
59
60
60
### Running Tomcat as a Windows service
61
61
62
-
Locate the file `<tomcat>/bin/tomcat8w.exe`. Run that executable and add `-javaagent:path/to/applicationinsights-agent-3.3.1.jar` to the `Java Options` under the `Java` tab.
62
+
Locate the file `<tomcat>/bin/tomcat8w.exe`. Run that executable and add `-javaagent:path/to/applicationinsights-agent-3.4.0.jar` to the `Java Options` under the `Java` tab.
63
63
64
64
65
65
## JBoss EAP 7
66
66
67
67
### Standalone server
68
68
69
-
Add `-javaagent:path/to/applicationinsights-agent-3.3.1.jar` to the existing `JAVA_OPTS` environment variable in the file `JBOSS_HOME/bin/standalone.conf` (Linux) or `JBOSS_HOME/bin/standalone.conf.bat` (Windows):
69
+
Add `-javaagent:path/to/applicationinsights-agent-3.4.0.jar` to the existing `JAVA_OPTS` environment variable in the file `JBOSS_HOME/bin/standalone.conf` (Linux) or `JBOSS_HOME/bin/standalone.conf.bat` (Windows):
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/java-standalone-config.md
+32-12Lines changed: 32 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,14 @@ You will find more details and additional configuration options below.
32
32
33
33
## Configuration file path
34
34
35
-
By default, Application Insights Java 3.x expects the configuration file to be named `applicationinsights.json`, and to be located in the same directory as `applicationinsights-agent-3.3.1.jar`.
35
+
By default, Application Insights Java 3.x expects the configuration file to be named `applicationinsights.json`, and to be located in the same directory as `applicationinsights-agent-3.4.0.jar`.
36
36
37
37
You can specify your own configuration file path using either
38
38
39
39
*`APPLICATIONINSIGHTS_CONFIGURATION_FILE` environment variable, or
40
40
*`applicationinsights.configuration.file` Java system property
41
41
42
-
If you specify a relative path, it will be resolved relative to the directory where `applicationinsights-agent-3.3.1.jar` is located.
42
+
If you specify a relative path, it will be resolved relative to the directory where `applicationinsights-agent-3.4.0.jar` is located.
43
43
44
44
Alternatively, instead of using a configuration file, you can specify the entire _content_ of the json configuration
45
45
via the environment variable `APPLICATIONINSIGHTS_CONFIGURATION_CONTENT`.
@@ -62,7 +62,7 @@ You can also set the connection string using the environment variable `APPLICATI
62
62
63
63
You can also set the connection string by specifying a file to load the connection string from.
64
64
65
-
If you specify a relative path, it will be resolved relative to the directory where `applicationinsights-agent-3.3.1.jar` is located.
65
+
If you specify a relative path, it will be resolved relative to the directory where `applicationinsights-agent-3.4.0.jar` is located.
66
66
67
67
```json
68
68
{
@@ -140,10 +140,12 @@ Furthermore, sampling is trace ID based, to help ensure consistent sampling deci
140
140
141
141
### Rate-Limited Sampling
142
142
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.
144
144
145
145
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.
147
149
If you still wish to capture all requests, use [fixed-percentage sampling](#fixed-percentage-sampling) and set the
148
150
sampling percentage to 100.
149
151
@@ -158,15 +160,15 @@ Here is an example how to set the sampling to capture at most (approximately) 1
158
160
```json
159
161
{
160
162
"sampling": {
161
-
"limitPerSecond": 1.0
163
+
"requestsPerSecond": 1.0
162
164
}
163
165
}
164
166
```
165
167
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.
168
170
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`
170
172
(which will then take precedence over rate limit specified in the json configuration).
171
173
172
174
### Fixed-Percentage Sampling
@@ -266,7 +268,7 @@ Starting from version 3.2.0, if you want to set a custom dimension programmatica
266
268
267
269
## Connection string overrides (preview)
268
270
269
-
This feature is in preview, starting from 3.4.0-BETA.
271
+
This feature is in preview, starting from 3.4.0.
270
272
271
273
Connection string overrides allow you to override the [default connection string](#connection-string), for example:
272
274
* Set one connection string for one http path prefix `/myapp1`.
@@ -479,7 +481,7 @@ To disable auto-collection of Micrometer metrics (including Spring Boot Actuator
479
481
480
482
Literal values in JDBC queries are masked by default in order to avoid accidentally capturing sensitive data.
481
483
482
-
Starting from 3.4.0-BETA, this behavior can be disabled if desired, e.g.
484
+
Starting from 3.4.0, this behavior can be disabled if desired, e.g.
483
485
484
486
```json
485
487
{
@@ -493,6 +495,24 @@ Starting from 3.4.0-BETA, this behavior can be disabled if desired, e.g.
493
495
}
494
496
```
495
497
498
+
## Mongo query masking
499
+
500
+
Literal values in Mongo queries are masked by default in order to avoid accidentally capturing sensitive data.
501
+
502
+
Starting from 3.4.0, this behavior can be disabled if desired, e.g.
503
+
504
+
```json
505
+
{
506
+
"instrumentation": {
507
+
"mongo": {
508
+
"masking": {
509
+
"enabled": false
510
+
}
511
+
}
512
+
}
513
+
}
514
+
```
515
+
496
516
## HTTP headers
497
517
498
518
Starting from version 3.3.0, you can capture request and response headers on your server (request) telemetry:
@@ -754,7 +774,7 @@ and the console, corresponding to this configuration:
754
774
`level` can be one of `OFF`, `ERROR`, `WARN`, `INFO`, `DEBUG`, or `TRACE`.
755
775
756
776
`path` can be an absolute or relative path. Relative paths are resolved against the directory where
757
-
`applicationinsights-agent-3.3.1.jar` is located.
777
+
`applicationinsights-agent-3.4.0.jar` is located.
758
778
759
779
`maxSizeMb` is the max size of the log file before it rolls over.
0 commit comments