Skip to content

Commit c9717be

Browse files
author
Jill Grant
authored
Merge pull request #236999 from AaronMaxwell/aaronmax-java-remove-ikey
Removing Java iKey refs
2 parents 3c18a0c + 7f9505d commit c9717be

File tree

5 files changed

+55
-89
lines changed

5 files changed

+55
-89
lines changed

articles/azure-monitor/app/api-custom-events-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ In Java, many dependency calls can be automatically tracked by using the
617617
You use this call if you want to track calls that the automated tracking doesn't catch.
618618

619619
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).
621621

622622
### Dependencies in Log Analytics
623623

articles/azure-monitor/app/get-metric.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Throttling is a concern because it can lead to missed alerts. The condition to t
3131
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.
3232

3333
> [!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.
3535
3636
## Get started with GetMetric
3737

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

Lines changed: 30 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: Configuration options - Azure Monitor Application Insights for Java
33
description: This article shows you how to configure Azure Monitor Application Insights for Java.
44
ms.topic: conceptual
5-
ms.date: 04/21/2023
5+
ms.date: 05/04/2023
66
ms.devlang: java
77
ms.custom: devx-track-java
88
ms.reviewer: mmcc
99
---
1010

1111
# Configuration options: Azure Monitor Application Insights for Java
1212

13-
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)]
13+
This article shows you how to configure Azure Monitor Application Insights for Java.
1414

1515
## Connection string and role name
1616

@@ -27,7 +27,7 @@ Connection string and role name are the most common settings you need to get sta
2727

2828
Connection string is required. Role name is important anytime you're sending data from different applications to the same Application Insights resource.
2929

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.
3131

3232
## Configuration file path
3333

@@ -38,7 +38,7 @@ You can specify your own configuration file path by using one of these two optio
3838
* `APPLICATIONINSIGHTS_CONFIGURATION_FILE` environment variable
3939
* `applicationinsights.configuration.file` Java system property
4040

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.
4242

4343
Alternatively, instead of using a configuration file, you can specify the entire _content_ of the JSON configuration via the environment variable `APPLICATIONINSIGHTS_CONFIGURATION_CONTENT`.
4444

@@ -73,7 +73,7 @@ The file should contain only the connection string and nothing else.
7373

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

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).
7777

7878
## Cloud role name
7979

@@ -132,15 +132,15 @@ Sampling is also based on trace ID to help ensure consistent sampling decisions
132132
Starting from 3.4.0, rate-limited sampling is available and is now the default.
133133

134134
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.
136136

137137
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.
138138

139139
> [!NOTE]
140140
> 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
141141
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.
142142

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:
144144

145145
```json
146146
{
@@ -150,7 +150,7 @@ This example shows how to set the sampling to capture at most (approximately) 1
150150
}
151151
```
152152

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.
154154

155155
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.
156156

@@ -206,16 +206,12 @@ If you want to collect some other JMX metrics:
206206

207207
In the preceding configuration example:
208208

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).
210210
* `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.
211211
* `attribute` is the attribute name inside of the JMX MBean that you want to collect.
212212

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

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-
219215
## Custom dimensions
220216

221217
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
237233
## Inherited attribute (preview)
238234

239235
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:
241237

242238
```json
243239
{
@@ -284,32 +280,6 @@ Connection string overrides allow you to override the [default connection string
284280
}
285281
```
286282

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/`.
295-
296-
```json
297-
{
298-
"preview": {
299-
"instrumentationKeyOverrides": [
300-
{
301-
"httpPathPrefix": "/myapp1",
302-
"instrumentationKey": "12345678-0000-0000-0000-0FEEDDADBEEF"
303-
},
304-
{
305-
"httpPathPrefix": "/myapp2",
306-
"instrumentationKey": "87654321-0000-0000-0000-0FEEDDADBEEF"
307-
}
308-
]
309-
}
310-
}
311-
```
312-
313283
## Cloud role name overrides (preview)
314284

315285
This feature is in preview, starting from 3.3.0.
@@ -378,7 +348,7 @@ Starting from version 3.2.0, if you want to capture controller "InProc" dependen
378348

379349
## Telemetry processors (preview)
380350

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:
382352

383353
* Mask sensitive data.
384354
* Conditionally add custom dimensions.
@@ -390,17 +360,17 @@ For more information, see the [Telemetry processor](./java-standalone-telemetry-
390360
> [!NOTE]
391361
> If you want to drop specific (whole) spans for controlling ingestion cost, see [Sampling overrides](./java-standalone-sampling-overrides.md).
392362
393-
## Auto-collected logging
363+
## Autocollected logging
394364

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.
396366

397367
Logging is only captured if it:
398368

399369
* Meets the level that's configured for the logging framework.
400370
* Also meets the level that's configured for Application Insights.
401371

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`.
404374

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

@@ -452,7 +422,7 @@ Starting from 3.4.2, you can capture the log markers for Logback and Log4j 2:
452422
}
453423
```
454424
455-
### Additional log attributes for Logback (preview)
425+
### Other log attributes for Logback (preview)
456426

457427
Starting from 3.4.3, you can capture `FileName`, `ClassName`, `MethodName`, and `LineNumber`, for Logback:
458428

@@ -482,11 +452,11 @@ If needed, you can temporarily re-enable the previous behavior:
482452
}
483453
```
484454

485-
## Auto-collected Micrometer metrics (including Spring Boot Actuator metrics)
455+
## Autocollected Micrometer metrics (including Spring Boot Actuator metrics)
486456

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.
488458

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.
490460

491461
To send custom metrics using micrometer:
492462

@@ -512,15 +482,15 @@ To send custom metrics using micrometer:
512482
counter.increment();
513483
```
514484

515-
1. The metrics will be ingested into the
485+
1. The metrics are ingested into the
516486
[customMetrics](/azure/azure-monitor/reference/tables/custommetrics) table, with tags captured in the
517487
`customDimensions` column. You can also view the metrics in the
518488
[metrics explorer](../essentials/metrics-getting-started.md) under the `Log-based metrics` metric namespace.
519489

520490
> [!NOTE]
521491
> 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`.
522492

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:
524494

525495
> [!NOTE]
526496
> 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
592562

593563
The header names are case insensitive.
594564

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
596566
`http.response.header.my_header_b`.
597567

598568
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
612582
}
613583
```
614584

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
616586
`http.request.header.my_header_c` and `http.response.header.my_header_d`.
617587

618588
## 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
629599
}
630600
```
631601

632-
## Suppress specific auto-collected telemetry
602+
## Suppress specific autocollected telemetry
633603

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:
635605

636606
```json
637607
{
@@ -744,7 +714,7 @@ The setting applies to the following metrics:
744714
* **Default performance counters**: For example, CPU and memory
745715
* **Default custom metrics**: For example, garbage collection timing
746716
* **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)
748718

749719
## Heartbeat
750720

@@ -771,7 +741,9 @@ For more information, see the [Authentication](./azure-ad-authentication.md) doc
771741

772742
## HTTP proxy
773743

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.
775747

776748
```json
777749
{
@@ -873,4 +845,4 @@ This example shows what a configuration file looks like with multiple components
873845
}
874846
}
875847
}
876-
```
848+
```

0 commit comments

Comments
 (0)