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/api-custom-events-metrics.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -617,7 +617,7 @@ In Java, many dependency calls can be automatically tracked by using the
617
617
You use this call if you want to track calls that the automated tracking doesn't catch.
618
618
619
619
To turn off the standard dependency-tracking module in C#, edit [ApplicationInsights.config](./configuration-with-applicationinsights-config.md) and delete the reference to `DependencyCollector.DependencyTrackingTelemetryModule`. For Java, see
620
-
[Suppressing specific autocollected telemetry](./java-standalone-config.md#suppress-specific-auto-collected-telemetry).
620
+
[Suppressing specific autocollected telemetry](./java-standalone-config.md#suppress-specific-autocollected-telemetry).
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/get-metric.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Throttling is a concern because it can lead to missed alerts. The condition to t
31
31
In summary, we recommend `GetMetric()` because it does pre-aggregation, it accumulates values from all the `Track()` calls, and sends a summary/aggregate once every minute. The `GetMetric()` method can significantly reduce the cost and performance overhead by sending fewer data points while still collecting all relevant information.
32
32
33
33
> [!NOTE]
34
-
> Only the .NET and .NET Core SDKs have a `GetMetric()` method. If you're using Java, see [Sending custom metrics using micrometer](./java-standalone-config.md#auto-collected-micrometer-metrics-including-spring-boot-actuator-metrics). For JavaScript and Node.js, you would still use `TrackMetric()`, but keep in mind the caveats that were outlined in the previous section. For Python, you can use [OpenCensus.stats](./opencensus-python.md#metrics) to send custom metrics, but the metrics implementation is different.
34
+
> Only the .NET and .NET Core SDKs have a `GetMetric()` method. If you're using Java, see [Sending custom metrics using micrometer](./java-standalone-config.md#autocollected-micrometer-metrics-including-spring-boot-actuator-metrics). For JavaScript and Node.js, you would still use `TrackMetric()`, but keep in mind the caveats that were outlined in the previous section. For Python, you can use [OpenCensus.stats](./opencensus-python.md#metrics) to send custom metrics, but the metrics implementation is different.
This article shows you how to configure Azure Monitor Application Insights for Java.
14
14
15
15
## Connection string and role name
16
16
@@ -27,7 +27,7 @@ Connection string and role name are the most common settings you need to get sta
27
27
28
28
Connection string is required. Role name is important anytime you're sending data from different applications to the same Application Insights resource.
29
29
30
-
You'll find more information and configuration options in the following sections.
30
+
More information and configuration options are provided in the following sections.
31
31
32
32
## Configuration file path
33
33
@@ -38,7 +38,7 @@ You can specify your own configuration file path by using one of these two optio
*`applicationinsights.configuration.file` Java system property
40
40
41
-
If you specify a relative path, it will be resolved relative to the directory where `applicationinsights-agent-3.4.12.jar` is located.
41
+
If you specify a relative path, it's resolved relative to the directory where `applicationinsights-agent-3.4.12.jar` is located.
42
42
43
43
Alternatively, instead of using a configuration file, you can specify the entire _content_ of the JSON configuration via the environment variable `APPLICATIONINSIGHTS_CONFIGURATION_CONTENT`.
44
44
@@ -73,7 +73,7 @@ The file should contain only the connection string and nothing else.
73
73
74
74
Not setting the connection string disables the Java agent.
75
75
76
-
If you have multiple applications deployed in the same JVM and want them to send telemetry to different instrumentation keys, see [Instrumentation key overrides (preview)](#instrumentation-key-overrides-preview).
76
+
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).
77
77
78
78
## Cloud role name
79
79
@@ -132,15 +132,15 @@ Sampling is also based on trace ID to help ensure consistent sampling decisions
132
132
Starting from 3.4.0, rate-limited sampling is available and is now the default.
133
133
134
134
If no sampling has been configured, the default is now rate-limited sampling configured to capture at most
135
-
(approximately) 5 requests per second, along with all the dependencies and logs on those requests.
135
+
(approximately) five requests per second, along with all the dependencies and logs on those requests.
136
136
137
137
This configuration replaces the prior default, which was to capture all requests. If you still want to capture all requests, use [fixed-percentage sampling](#fixed-percentage-sampling) and set the sampling percentage to 100.
138
138
139
139
> [!NOTE]
140
140
> The rate-limited sampling is approximate because internally it must adapt a "fixed" sampling percentage over time to emit accurate item counts on each telemetry record. Internally, the rate-limited sampling is
141
141
tuned to adapt quickly (0.1 seconds) to new application loads. For this reason, you shouldn't see it exceed the configured rate by much, or for very long.
142
142
143
-
This example shows how to set the sampling to capture at most (approximately) 1 request per second:
143
+
This example shows how to set the sampling to capture at most (approximately) one request per second:
144
144
145
145
```json
146
146
{
@@ -150,7 +150,7 @@ This example shows how to set the sampling to capture at most (approximately) 1
150
150
}
151
151
```
152
152
153
-
Note that `requestsPerSecond` can be a decimal, so you can configure it to capture less than 1 request per second if you want. For example, a value of `0.5` means capture at most 1 request every 2 seconds.
153
+
The `requestsPerSecond` can be a decimal, so you can configure it to capture less than one request per second if you want. For example, a value of `0.5` means capture at most one request every 2 seconds.
154
154
155
155
You can also set the sampling percentage by using the environment variable `APPLICATIONINSIGHTS_SAMPLING_REQUESTS_PER_SECOND`. It then takes precedence over the rate limit specified in the JSON configuration.
156
156
@@ -206,16 +206,12 @@ If you want to collect some other JMX metrics:
206
206
207
207
In the preceding configuration example:
208
208
209
-
*`name` is the metric name that will be assigned to this JMX metric (can be anything).
209
+
*`name` is the metric name that is assigned to this JMX metric (can be anything).
210
210
*`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.
211
211
*`attribute` is the attribute name inside of the JMX MBean that you want to collect.
212
212
213
213
Numeric and Boolean JMX metric values are supported. Boolean JMX metrics are mapped to `0` for false and `1` for true.
214
214
215
-
If the JMX metric's `objectName` is dynamic and changes on each restart, you can specify it using an
216
-
[object name pattern](https://docs.oracle.com/javase/8/docs/api/javax/management/ObjectName.html),
217
-
e.g. `kafka.consumer:type=consumer-fetch-manager-metrics,client-id=*`.
218
-
219
215
## Custom dimensions
220
216
221
217
If you want to add custom dimensions to all your telemetry:
@@ -237,7 +233,7 @@ You can use `${...}` to read the value from the specified environment variable a
237
233
## Inherited attribute (preview)
238
234
239
235
Starting from version 3.2.0, if you want to set a custom dimension programmatically on your request telemetry
240
-
and have it inherited by dependency and log telemetry which are captured in the context of that request:
236
+
and have it inherited by dependency and log telemetry, which are captured in the context of that request:
241
237
242
238
```json
243
239
{
@@ -284,32 +280,6 @@ Connection string overrides allow you to override the [default connection string
284
280
}
285
281
```
286
282
287
-
## Instrumentation key overrides (preview)
288
-
289
-
This feature is in preview, starting from 3.2.3.
290
-
291
-
Instrumentation key overrides allow you to override the [default instrumentation key](#connection-string). For example, you can:
292
-
293
-
* Set one instrumentation key for one HTTP path prefix `/myapp1`.
294
-
* Set another instrumentation key for another HTTP path prefix `/myapp2/`.
@@ -378,7 +348,7 @@ Starting from version 3.2.0, if you want to capture controller "InProc" dependen
378
348
379
349
## Telemetry processors (preview)
380
350
381
-
Yu can use telemetry processors to configure rules that will be applied to request, dependency, and trace telemetry. For example, you can:
351
+
Yu can use telemetry processors to configure rules that are applied to request, dependency, and trace telemetry. For example, you can:
382
352
383
353
* Mask sensitive data.
384
354
* Conditionally add custom dimensions.
@@ -390,17 +360,17 @@ For more information, see the [Telemetry processor](./java-standalone-telemetry-
390
360
> [!NOTE]
391
361
> If you want to drop specific (whole) spans for controlling ingestion cost, see [Sampling overrides](./java-standalone-sampling-overrides.md).
392
362
393
-
## Auto-collected logging
363
+
## Autocollected logging
394
364
395
-
Log4j, Logback, JBoss Logging, and java.util.logging are auto-instrumented. Logging performed via these logging frameworks is auto-collected.
365
+
Log4j, Logback, JBoss Logging, and java.util.logging are autoinstrumented. Logging performed via these logging frameworks is autocollected.
396
366
397
367
Logging is only captured if it:
398
368
399
369
* Meets the level that's configured for the logging framework.
400
370
* Also meets the level that's configured for Application Insights.
401
371
402
-
For example, if your logging framework is configured to log `WARN` (and above) from the package `com.example`,
403
-
and Application Insights is configured to capture `INFO` (and above), Application Insights will only capture`WARN` (and above) from the package `com.example`.
372
+
For example, if your logging framework is configured to log `WARN` (and aforementioned) from the package `com.example`,
373
+
and Application Insights is configured to capture `INFO` (and aforementioned), Application Insights only captures`WARN` (and more severe) from the package `com.example`.
404
374
405
375
The default level configured for Application Insights is `INFO`. If you want to change this level:
406
376
@@ -452,7 +422,7 @@ Starting from 3.4.2, you can capture the log markers for Logback and Log4j 2:
452
422
}
453
423
```
454
424
455
-
### Additional log attributes for Logback (preview)
425
+
### Other log attributes for Logback (preview)
456
426
457
427
Starting from 3.4.3, you can capture `FileName`, `ClassName`, `MethodName`, and `LineNumber`, for Logback:
458
428
@@ -482,11 +452,11 @@ If needed, you can temporarily re-enable the previous behavior:
482
452
}
483
453
```
484
454
485
-
## Auto-collected Micrometer metrics (including Spring Boot Actuator metrics)
455
+
## Autocollected Micrometer metrics (including Spring Boot Actuator metrics)
486
456
487
-
If your application uses [Micrometer](https://micrometer.io), metrics that are sent to the Micrometer global registry are auto-collected.
457
+
If your application uses [Micrometer](https://micrometer.io), metrics that are sent to the Micrometer global registry are autocollected.
488
458
489
-
Also, if your application uses [Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html), metrics configured by Spring Boot Actuator are also auto-collected.
459
+
Also, if your application uses [Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html), metrics configured by Spring Boot Actuator are also autocollected.
490
460
491
461
To send custom metrics using micrometer:
492
462
@@ -512,15 +482,15 @@ To send custom metrics using micrometer:
512
482
counter.increment();
513
483
```
514
484
515
-
1. The metrics will be ingested into the
485
+
1. The metrics are ingested into the
516
486
[customMetrics](/azure/azure-monitor/reference/tables/custommetrics) table, with tags captured in the
517
487
`customDimensions` column. You can also view the metrics in the
518
488
[metrics explorer](../essentials/metrics-getting-started.md) under the `Log-based metrics` metric namespace.
519
489
520
490
> [!NOTE]
521
491
> Application Insights Java replaces all non-alphanumeric characters (except dashes) in the Micrometer metric name with underscores. As a result, the preceding `test.counter` metric will show up as `test_counter`.
522
492
523
-
To disable auto-collection of Micrometer metrics and Spring Boot Actuator metrics:
493
+
To disable autocollection of Micrometer metrics and Spring Boot Actuator metrics:
524
494
525
495
> [!NOTE]
526
496
> Custom metrics are billed separately and might generate extra costs. Make sure to check the [Pricing information](https://azure.microsoft.com/pricing/details/monitor/). To disable the Micrometer and Spring Boot Actuator metrics, add the following configuration to your config file.
@@ -592,7 +562,7 @@ Starting from version 3.3.0, you can capture request and response headers on you
592
562
593
563
The header names are case insensitive.
594
564
595
-
The preceding examples will be captured under the property names `http.request.header.my_header_a` and
565
+
The preceding examples are captured under the property names `http.request.header.my_header_a` and
596
566
`http.response.header.my_header_b`.
597
567
598
568
Similarly, you can capture request and response headers on your client (dependency) telemetry:
@@ -612,7 +582,7 @@ Similarly, you can capture request and response headers on your client (dependen
612
582
}
613
583
```
614
584
615
-
Again, the header names are case insensitive. The preceding examples will be captured under the property names
585
+
Again, the header names are case insensitive. The preceding examples are captured under the property names
616
586
`http.request.header.my_header_c` and `http.response.header.my_header_d`.
617
587
618
588
## HTTP server 4xx response codes
@@ -629,9 +599,9 @@ Starting from version 3.3.0, you can change this behavior to capture them as suc
629
599
}
630
600
```
631
601
632
-
## Suppress specific auto-collected telemetry
602
+
## Suppress specific autocollected telemetry
633
603
634
-
Starting from version 3.0.3, specific auto-collected telemetry can be suppressed by using these configuration options:
604
+
Starting from version 3.0.3, specific autocollected telemetry can be suppressed by using these configuration options:
635
605
636
606
```json
637
607
{
@@ -744,7 +714,7 @@ The setting applies to the following metrics:
744
714
***Default performance counters**: For example, CPU and memory
745
715
***Default custom metrics**: For example, garbage collection timing
746
716
***Configured JMX metrics**: [See the JMX metric section](#jmx-metrics)
747
-
***Micrometer metrics**: [See the Auto-collected Micrometer metrics section](#auto-collected-micrometer-metrics-including-spring-boot-actuator-metrics)
717
+
***Micrometer metrics**: [See the Autocollected Micrometer metrics section](#autocollected-micrometer-metrics-including-spring-boot-actuator-metrics)
748
718
749
719
## Heartbeat
750
720
@@ -771,7 +741,9 @@ For more information, see the [Authentication](./azure-ad-authentication.md) doc
771
741
772
742
## HTTP proxy
773
743
774
-
If your application is behind a firewall and can't connect directly to Application Insights (see [IP addresses used by Application Insights](./ip-addresses.md)), you can configure Application Insights Java 3.x to use an HTTP proxy:
744
+
If your application is behind a firewall and can't connect directly to Application Insights, refer to [IP addresses used by Application Insights](./ip-addresses.md).
745
+
746
+
To work around this issue, you can configure Application Insights Java 3.x to use an HTTP proxy.
775
747
776
748
```json
777
749
{
@@ -873,4 +845,4 @@ This example shows what a configuration file looks like with multiple components
0 commit comments