Skip to content

Commit 0dc77fa

Browse files
committed
Change code snippets
1 parent 36d2e82 commit 0dc77fa

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Add `-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar` to the exis
8585

8686
Add `-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar` to the existing `jvm-options` in `JBOSS_HOME/domain/configuration/host.xml`:
8787

88-
```html
88+
```xml
8989
...
9090
<jvms>
9191
<jvm name="default">
@@ -104,7 +104,7 @@ Add `-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar` to the exis
104104

105105
If you are running multiple managed servers on a single host, you will need to add `applicationinsights.agent.id` to the `system-properties` for each `server`:
106106

107-
```html
107+
```xml
108108
...
109109
<servers>
110110
<server name="server-one" group="main-server-group">
@@ -118,7 +118,7 @@ If you are running multiple managed servers on a single host, you will need to a
118118
<!--Edit system properties for server-two-->
119119
<system-properties>
120120
<property name="applicationinsights.agent.id" value="..."/>
121-
</system-properties&gt>
121+
</system-properties>
122122
</server>
123123
</servers>
124124
...
@@ -141,7 +141,7 @@ Add these lines to `start.ini`
141141

142142
Add `-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar` to the existing `jvm-options` in `glassfish/domains/domain1/config/domain.xml`:
143143

144-
```html
144+
```xml
145145
...
146146
<java-config ...>
147147
<!--Edit the JVM options here-->

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ If you want to set the cloud role name:
5555
```json
5656
{
5757
"instrumentationSettings": {
58-
"preview": {
59-
//Set the cloud role name here:
58+
"preview": {
6059
"roleName": "my cloud role name"
6160
}
6261
}
@@ -77,7 +76,6 @@ If you want to set the cloud role instance to something different rather than th
7776
{
7877
"instrumentationSettings": {
7978
"preview": {
80-
//Set the cloud instance here:
8179
"roleInstance": "my cloud role instance"
8280
}
8381
}
@@ -99,7 +97,6 @@ If you want to change this threshold:
9997
"instrumentationSettings": {
10098
"preview": {
10199
"instrumentation": {
102-
//Set logging threshold here
103100
"logging": {
104101
"threshold": "ERROR"
105102
}
@@ -132,7 +129,6 @@ If you have some JMX metrics that you are interested in capturing:
132129
{
133130
"instrumentationSettings": {
134131
"preview": {
135-
//Configure the JMX metrics here:
136132
"jmxMetrics": [
137133
{
138134
"objectName": "java.lang:type=ClassLoading",
@@ -161,7 +157,6 @@ If you want to disable this feature:
161157
"instrumentationSettings": {
162158
"preview": {
163159
"instrumentation": {
164-
//To disable Micrometer:
165160
"micrometer": {
166161
"enabled": false
167162
}
@@ -179,7 +174,6 @@ By default, Application Insights Java 3.0 Preview sends a heartbeat metric once
179174
{
180175
"instrumentationSettings": {
181176
"preview": {
182-
//Adjust the heartbeat frequency here:
183177
"heartbeat": {
184178
"intervalSeconds": 60
185179
}
@@ -198,14 +192,12 @@ Sampling is performed as a function on the operation ID (also known as trace ID)
198192

199193
For example, if you set sampling to 10%, you will only see 10% of your transactions, but each one of those 10% will have full end-to-end transaction details.
200194

201-
To enable sampling:
195+
Here is an example how to set the sampling to **10% of all transactions** - please make sure you set the sampling rate that is correct for your use case:
202196

203197
```json
204198
{
205199
"instrumentationSettings": {
206200
"preview": {
207-
//Set the sampling rate here.
208-
//below is an example how to set the sampling to 10% of all trnsactions
209201
"sampling": {
210202
"fixedRate": {
211203
"percentage": 10
@@ -224,7 +216,6 @@ If your application is behind a firewall and cannot connect directly to Applicat
224216
{
225217
"instrumentationSettings": {
226218
"preview": {
227-
//Set the HTTP proxy:
228219
"httpProxy": {
229220
"host": "myproxy",
230221
"port": 8080
@@ -246,7 +237,6 @@ By default, it logs to console with level `warn`, corresponding to this configur
246237
{
247238
"instrumentationSettings": {
248239
"preview": {
249-
//SelfDiagnostic configuration
250240
"selfDiagnostics": {
251241
"destination": "console",
252242
"level": "WARN"
@@ -264,7 +254,6 @@ If you want to log to a file instead of logging to console:
264254
{
265255
"instrumentationSettings": {
266256
"preview": {
267-
//To log the output from self diagnostics to a file
268257
"selfDiagnostics": {
269258
"destination": "file",
270259
"directory": "/var/log/applicationinsights",

0 commit comments

Comments
 (0)