Skip to content

Commit ce7642e

Browse files
authored
Merge pull request #268616 from ktoliver/219874
[AQ] edit pass: Raise Acrolinx scores in 9 azure-monitor/app articles (work item 219874)
2 parents a5e7b3a + c197cdd commit ce7642e

9 files changed

+147
-148
lines changed

articles/azure-monitor/app/java-get-started-supplemental.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Application Insights with containers
3-
description: This article shows you how to set-up Application Insights
3+
description: This article shows you how to set up Application Insights.
44
ms.topic: conceptual
55
ms.date: 03/12/2024
66
ms.devlang: java
@@ -10,7 +10,7 @@ ms.reviewer: mmcc
1010

1111
# Get Started (Supplemental)
1212

13-
In the following sections, you will find information on how to get Java autoinstrumentation for specific technical environments.
13+
In the following sections, learn how to get Java autoinstrumentation for specific technical environments.
1414

1515
## Azure App Service
1616

@@ -37,7 +37,7 @@ If you're using the *exec* form, add the parameter `-javaagent:"path/to/applicat
3737
ENTRYPOINT ["java", "-javaagent:path/to/applicationinsights-agent-3.5.1.jar", "-jar", "<myapp.jar>"]
3838
```
3939

40-
If you're using the *shell* form, add the JVM arg `-javaagent:"path/to/applicationinsights-agent-3.5.1.jar"` somewhere before `-jar`, for example:
40+
If you're using the *shell* form, add the Java Virtual Machine (JVM) arg `-javaagent:"path/to/applicationinsights-agent-3.5.1.jar"` somewhere before `-jar`, for example:
4141

4242
```
4343
ENTRYPOINT java -javaagent:"path/to/applicationinsights-agent-3.5.1.jar" -jar <myapp.jar>
@@ -62,11 +62,11 @@ ENV APPLICATIONINSIGHTS_CONNECTION_STRING="CONNECTION-STRING"
6262
ENTRYPOINT["java", "-javaagent:applicationinsights-agent-3.5.1.jar", "-jar", "app.jar"]
6363
```
6464

65-
In this example we have copied the `applicationinsights-agent-3.5.1.jar` and `applicationinsights.json` files from an `agent` folder (you can choose any folder of your machine). These two files have to be in the same folder in the Docker container.
65+
In this example, you copy the `applicationinsights-agent-3.5.1.jar` and `applicationinsights.json` files from an `agent` folder (you can choose any folder of your machine). These two files have to be in the same folder in the Docker container.
6666

67-
### Third-party container images
67+
### Partner container images
6868

69-
If you're using a third-party container image that you can't modify, mount the Application Insights Java agent jar into the container from outside. Set the environment variable for the container
69+
If you're using a partner container image that you can't modify, mount the Application Insights Java agent jar into the container from outside. Set the environment variable for the container
7070
`JAVA_TOOL_OPTIONS=-javaagent:/path/to/applicationinsights-agent.jar`.
7171

7272
## Spring Boot
@@ -75,7 +75,7 @@ For more information, see [Using Azure Monitor Application Insights with Spring
7575

7676
## Java Application servers
7777

78-
For information on setting up the Application Insights Java agent, see [Enabling Azure Monitor OpenTelemetry for Java](./opentelemetry-enable.md?tabs=java). The following sections provide additional details which may be helpful when configuring the `-javaagent:...` JVM arg on different application servers.
78+
For information on setting up the Application Insights Java agent, see [Enabling Azure Monitor OpenTelemetry for Java](./opentelemetry-enable.md?tabs=java). The following sections provide details that might be helpful when configuring the `-javaagent:...` JVM arg on different application servers.
7979

8080
### Tomcat 8 (Linux)
8181

@@ -119,7 +119,9 @@ If the file `<tomcat>/bin/setenv.bat` already exists, modify that file and add `
119119

120120
Locate the file `<tomcat>/bin/tomcat8w.exe`. Run that executable and add `-javaagent:path/to/applicationinsights-agent-3.5.1.jar` to the `Java Options` under the `Java` tab.
121121

122-
### JBoss EAP 7
122+
### JBoss Enterprise Application Platform 7
123+
124+
In Red Hat JBoss Enterprise Application Platform (EAP) 7, you can set up a standalone server or a domain server.
123125

124126
#### Standalone server
125127

@@ -151,7 +153,7 @@ Add `-javaagent:path/to/applicationinsights-agent-3.5.1.jar` to the existing `jv
151153
...
152154
```
153155

154-
If you're running multiple managed servers on a single host, you'll need to add `applicationinsights.agent.id` to the `system-properties` for each `server`:
156+
If you're running multiple managed servers on a single host, you need to add `applicationinsights.agent.id` to the `system-properties` for each `server`:
155157

156158
```xml
157159
...
@@ -173,7 +175,7 @@ If you're running multiple managed servers on a single host, you'll need to add
173175
...
174176
```
175177

176-
The specified `applicationinsights.agent.id` value must be unique. It's used to create a subdirectory under the Application Insights directory. Each JVM process needs its own local Application Insights config and local Application Insights log file. Also, if reporting to the central collector, the `applicationinsights.properties` file is shared by the multiple managed servers, so the specified `applicationinsights.agent.id` is needed to override the `agent.id` setting in that shared file. The `applicationinsights.agent.rollup.id` can be similarly specified in the server's `system-properties` if you need to override the `agent.rollup.id` setting per managed server.
178+
The specified `applicationinsights.agent.id` value must be unique. You use the value to create a subdirectory under the Application Insights directory. Each JVM process needs its own local Application Insights config and local Application Insights log file. Also, if reporting to the central collector, multiple managed servers share the `applicationinsights.properties` file, so the specified `applicationinsights.agent.id` is needed to override the `agent.id` setting in that shared file. The `applicationinsights.agent.rollup.id` can be similarly specified in the server's `system-properties` if you need to override the `agent.rollup.id` setting per managed server.
177179

178180
### Jetty 9
179181

@@ -203,13 +205,9 @@ Add `-javaagent:path/to/applicationinsights-agent-3.5.1.jar` to the existing `jv
203205
### WebSphere 8
204206

205207
1. Open Management Console.
206-
1. Go to **Servers** > **WebSphere application servers** > **Application servers**. Choose the appropriate application servers and select:
207-
208-
```
209-
Java and Process Management > Process definition > Java Virtual Machine
210-
```
208+
1. Go to **Servers** > **WebSphere application servers** > **Application servers**. Choose the appropriate application servers and select **Java and Process Management** > **Process definition** > **Java Virtual Machine**.
211209

212-
1. In `Generic JVM arguments`, add the following JVM argument:
210+
1. In `Generic JVM arguments`, add the following JVM argument.
213211

214212
```
215213
-javaagent:path/to/applicationinsights-agent-3.5.1.jar
@@ -227,4 +225,4 @@ Create a new file `jvm.options` in the server directory (for example, `<openlibe
227225
228226
### Others
229227
230-
See your application server documentation on how to add JVM args.
228+
See your application server documentation on how to add JVM args.

articles/azure-monitor/app/java-jmx-metrics-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How to configure JMX metrics - Azure Monitor application insights for Java
3-
description: Configure extra JMX metrics collection for Azure Monitor Application Insights Java agent
3+
description: Configure extra Java Management Extensions (JMX) metrics collection for Azure Monitor Application Insights Java agent.
44
ms.topic: conceptual
55
ms.date: 12/15/2023
66
ms.devlang: java
@@ -10,11 +10,11 @@ ms.reviewer: mmcc
1010

1111
# Configuring JMX metrics
1212

13-
Application Insights Java 3.x collects some of the JMX metrics by default, but in many cases it isn't enough. This document describes the JMX configuration option in details.
13+
Application Insights Java 3.x collects some of the Java Management Extensions (JMX) metrics by default, but in many cases it isn't enough. This document describes the JMX configuration option in details.
1414

1515
## How do I collect extra JMX metrics?
1616

17-
JMX metrics collection can be configured by adding a ```"jmxMetrics"``` section to the applicationinsights.json file. You can specify the name of the metric the way you want it to appear in Azure portal in application insights resource. Object name and attribute are required for each of the metrics you want collected.
17+
JMX metrics collection can be configured by adding a ```"jmxMetrics"``` section to the applicationinsights.json file. Enter a name for the metric as you want it to appear in Azure portal in application insights resource. Object name and attribute are required for each of the metrics you want collected.
1818

1919
## How do I know what metrics are available to configure?
2020

articles/azure-monitor/app/java-spring-boot.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: devx-track-java, devx-track-extended-java
1212
> [!NOTE]
1313
> With _Spring Boot native image applications_, you can use [this project](https://aka.ms/AzMonSpringNative).
1414
15-
There are two options for enabling Application Insights Java with Spring Boot: JVM argument and programmatically.
15+
There are two options for enabling Application Insights Java with Spring Boot: Java Virtual Machine (JVM) argument and programmatically.
1616

1717
## Enabling with JVM argument
1818

@@ -42,8 +42,7 @@ To enable Application Insights Java programmatically, you must add the following
4242
</dependency>
4343
```
4444

45-
And invoke the `attach()` method of the `com.microsoft.applicationinsights.attach.ApplicationInsights` class
46-
in the first line of your `main()` method.
45+
And invoke the `attach()` method of the `com.microsoft.applicationinsights.attach.ApplicationInsights` class that's in the beginning line of your `main()` method.
4746

4847
> [!WARNING]
4948
>
@@ -73,15 +72,15 @@ public class SpringBootApp {
7372
### Configuration
7473

7574
Programmatic enablement supports all the same [configuration options](./java-standalone-config.md)
76-
as the JVM argument enablement, with the following differences below.
75+
as the JVM argument enablement, with the differences that are described in the next sections.
7776

7877
#### Configuration file location
7978

8079
By default, when enabling Application Insights Java programmatically, the configuration file `applicationinsights.json`
81-
will be read from the classpath (`src/main/resources`, `src/test/resources`).
80+
is read from the classpath (`src/main/resources`, `src/test/resources`).
8281

8382
From 3.4.3, you can configure the name of a JSON file in the classpath with the `applicationinsights.runtime-attach.configuration.classpath.file` system property.
84-
For example, with `-Dapplicationinsights.runtime-attach.configuration.classpath.file=applicationinsights-dev.json`, Application Insights will use `applicationinsights-dev.json` file for configuration. To programmatically configure another file in the classpath:
83+
For example, with `-Dapplicationinsights.runtime-attach.configuration.classpath.file=applicationinsights-dev.json`, Application Insights uses the `applicationinsights-dev.json` file for configuration. To programmatically configure another file in the classpath:
8584

8685
```java
8786
public static void main(String[] args) {
@@ -141,6 +140,6 @@ Enable connection string configured at runtime:
141140
#### Self-diagnostic log file location
142141

143142
By default, when enabling Application Insights Java programmatically, the `applicationinsights.log` file containing
144-
the agent logs will be located in the directory from where the JVM is launched (user directory).
143+
the agent logs are located in the directory from where the JVM is launched (user directory).
145144

146-
See [self-diagnostic configuration options](./java-standalone-config.md#self-diagnostics) to change this location.
145+
To learn how to change this location, see your [self-diagnostic configuration options](./java-standalone-config.md#self-diagnostics).

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The file should contain only the connection string and nothing else.
7272

7373
Not setting the connection string disables the Java agent.
7474

75-
If you have multiple applications deployed in the same JVM and want them to send telemetry to different connection strings, see [Connection string overrides (preview)](#connection-string-overrides-preview).
75+
If you have multiple applications deployed in the same Java Virtual Machine (JVM) and want them to send telemetry to different connection strings, see [Connection string overrides (preview)](#connection-string-overrides-preview).
7676

7777
## Cloud role name
7878

@@ -185,9 +185,9 @@ Sampling overrides allow you to override the [default sampling percentage](#samp
185185

186186
For more information, see the [Sampling overrides](./java-standalone-sampling-overrides.md) documentation.
187187

188-
## JMX metrics
188+
## Java Management Extensions metrics
189189

190-
If you want to collect some other JMX metrics:
190+
If you want to collect some other Java Management Extensions (JMX) metrics:
191191

192192
```json
193193
{
@@ -209,12 +209,12 @@ If you want to collect some other JMX metrics:
209209
In the preceding configuration example:
210210

211211
* `name` is the metric name that is assigned to this JMX metric (can be anything).
212-
* `objectName` is the [Object Name](https://docs.oracle.com/javase/8/docs/api/javax/management/ObjectName.html) of the `JMX MBean` that you want to collect. Wildcard character asterisk (*) is supported.
212+
* `objectName` is the [Object Name](https://docs.oracle.com/javase/8/docs/api/javax/management/ObjectName.html) of the `JMX MBean` that you want to collect. Wildcard character asterisk (*) is supported.
213213
* `attribute` is the attribute name inside of the `JMX MBean` that you want to collect.
214214

215215
Numeric and Boolean JMX metric values are supported. Boolean JMX metrics are mapped to `0` for false and `1` for true.
216216

217-
See the [JMX metrics](./java-jmx-metrics-configuration.md) documentation for more details.
217+
For more information, see the [JMX metrics](./java-jmx-metrics-configuration.md) documentation.
218218

219219
## Custom dimensions
220220

@@ -251,7 +251,7 @@ Starting with version 3.2.0, you can set a custom dimension programmatically on
251251
}
252252
```
253253

254-
and then at the beginning of each request, call:
254+
And then at the beginning of each request, call:
255255

256256
```java
257257
Span.current().setAttribute("mycustomer", "xyz");
@@ -322,7 +322,7 @@ add this property to your json configuration:
322322
}
323323
```
324324

325-
and add `applicationinsights-core` to your application:
325+
Add `applicationinsights-core` to your application:
326326

327327
```xml
328328
<dependency>
@@ -332,7 +332,7 @@ and add `applicationinsights-core` to your application:
332332
</dependency>
333333
```
334334

335-
and use the static `configure(String)` method in the class
335+
Use the static `configure(String)` method in the class
336336
`com.microsoft.applicationinsights.connectionstring.ConnectionString`.
337337

338338
> [!NOTE]
@@ -387,7 +387,7 @@ It automatically modifies to return:
387387
</html>
388388
```
389389

390-
The script is aiming at helping customers to track the web user data, and sent the collecting server-side telemetry back to users' Azure portal. Details can be found at [ApplicationInsights-JS](https://github.com/microsoft/ApplicationInsights-JS)
390+
The script is aiming at helping customers to track the web user data, and sent the collecting server-side telemetry back to users' Azure portal. Details can be found at [ApplicationInsights-JS](https://github.com/microsoft/ApplicationInsights-JS).
391391

392392
If you want to enable this feature, add the below configuration option:
393393

@@ -424,8 +424,8 @@ Logging is only captured if it:
424424
* Meets the configured level for the logging framework.
425425
* Also meets the configured level for Application Insights.
426426

427-
For example, if your logging framework is configured to log `WARN` (and aforementioned) from the package `com.example`,
428-
and Application Insights is configured to capture `INFO` (and aforementioned), Application Insights only captures `WARN` (and more severe) from the package `com.example`.
427+
For example, if your logging framework is configured to log `WARN` (and you configured it as described earlier) from the package `com.example`,
428+
and Application Insights is configured to capture `INFO` (and you configured as described), Application Insights only captures `WARN` (and more severe) from the package `com.example`.
429429

430430
The default level configured for Application Insights is `INFO`. If you want to change this level:
431431

@@ -515,7 +515,7 @@ Also, if your application uses [Spring Boot Actuator](https://docs.spring.io/spr
515515

516516
To send custom metrics using micrometer:
517517

518-
1. Add Micrometer to your application:
518+
1. Add Micrometer to your application as shown in the following example.
519519

520520
```xml
521521
<dependency>
@@ -525,13 +525,13 @@ To send custom metrics using micrometer:
525525
</dependency>
526526
```
527527

528-
1. Use the Micrometer [global registry](https://micrometer.io/?/docs/concepts#_global_registry) to create a meter:
528+
1. Use the Micrometer [global registry](https://micrometer.io/?/docs/concepts#_global_registry) to create a meter as shown in the following example.
529529

530530
```java
531531
static final Counter counter = Metrics.counter("test.counter");
532532
```
533533

534-
1. Use the counter to record metrics:
534+
1. Use the counter to record metrics by using the following command.
535535

536536
```java
537537
counter.increment();
@@ -560,9 +560,9 @@ To disable autocollection of Micrometer metrics and Spring Boot Actuator metrics
560560
}
561561
```
562562

563-
## JDBC query masking
563+
## Java Database Connectivity query masking
564564

565-
Literal values in JDBC queries are masked by default to avoid accidentally capturing sensitive data.
565+
Literal values in Java Database Connectivity (JDBC) queries are masked by default to avoid accidentally capturing sensitive data.
566566

567567
Starting from 3.4.0, this behavior can be disabled. For example:
568568

@@ -774,7 +774,7 @@ The setting applies to the following metrics:
774774

775775
* **Default performance counters**: For example, CPU and memory
776776
* **Default custom metrics**: For example, garbage collection timing
777-
* **Configured JMX metrics**: [See the JMX metric section](#jmx-metrics)
777+
* **Configured JMX metrics**: [See the JMX metric section](#java-management-extensions-metrics)
778778
* **Micrometer metrics**: [See the Autocollected Micrometer metrics section](#autocollected-micrometer-metrics-including-spring-boot-actuator-metrics)
779779

780780
## Heartbeat

0 commit comments

Comments
 (0)