Skip to content

Commit 465782c

Browse files
committed
Removing temporary comments and making small edits
1 parent 07dff78 commit 465782c

File tree

1 file changed

+7
-40
lines changed

1 file changed

+7
-40
lines changed

articles/azure-monitor/app/deprecated-java-2x.md

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Azure Monitor Application Insights for Java 2.x
3-
description: A step by step guide on using Java 2.x with Application Insights.
2+
title: Use the Application Insights Java 2.x SDK
3+
description: Learn how to use the Application Insights Java 2.x SDK, including sending trace logs, monitoring dependencies, filtering telemetry, and measuring metrics.
44
ms.topic: conceptual
55
ms.date: 12/07/2022
66
ms.devlang: java
@@ -15,9 +15,9 @@ ms.reviewer: mmcc
1515
>
1616
> Documentation for the latest version can be found at [Application Insights Java 3.x](./java-in-process-agent.md).
1717
18-
In this article, you'll learn how to use Java 2.x with Application Insights. This article shows you how to:
18+
In this article, you'll learn how to use the Application Insights Java 2.x SDK. This article shows you how to:
1919

20-
- Get started, including instrumenting request, tracking dependencies, collecting performance counters, diagnosing performance issues and exceptions, and writing code to track what users do with your app
20+
- Get started, including instrumenting requests, tracking dependencies, collecting performance counters, diagnosing performance issues and exceptions, and writing code to track what users do with your app
2121
- Send trace logs to Application Insights and explore them using the Application Insights portal.
2222
- Monitor dependencies, caught exceptions, and method execution times in Java web apps
2323
- Filter telemetry in your Java web app
@@ -28,7 +28,7 @@ In this article, you'll learn how to use Java 2.x with Application Insights. Thi
2828

2929
## Get started with Application Insights in a Java web project
3030

31-
In this section, you use the Application Insights SDK to instrument request, track dependencies, and collect performance counters, diagnose performance issues and exceptions, and write code to track what users do with your app.
31+
In this section, you use the Application Insights SDK to instrument requests, track dependencies, and collect performance counters, diagnose performance issues and exceptions, and write code to track what users do with your app.
3232

3333
Application Insights is an extensible analytics service for web developers that helps you understand the performance and usage of your live application. Application Insights supports Java apps running on Linux, Unix, or Windows.
3434

@@ -301,7 +301,6 @@ See the dedicated [troubleshooting article](/troubleshoot/azure/azure-monitor/ap
301301

302302
[!INCLUDE [azure-monitor-app-insights-test-connectivity](../../../includes/azure-monitor-app-insights-test-connectivity.md)]
303303

304-
<!--START ARTICLE: Log traces -->
305304
## Explore Java trace logs in Application Insights
306305

307306
If you're using Logback or Log4J (v1.2 or v2.0) for tracing, you can have your trace logs sent automatically to Application Insights where you can explore and search on them.
@@ -481,8 +480,6 @@ Exceptions submitted via loggers will be displayed on the portal as Exception Te
481480

482481
:::image type="content" source="./media/deprecated-java-2x/01-diagnostics.png" alt-text="In the Application Insights portal, open Search" lightbox="./media/deprecated-java-2x/01-diagnostics.png":::
483482

484-
<!-- START ARTICLE: Dependencies -->
485-
486483
## Monitor dependencies, caught exceptions, and method execution times in Java web apps
487484

488485
If you have [instrumented your Java web app with Application Insights SDK][javaagent], you can use the Java Agent to get deeper insights, without any code changes:
@@ -596,7 +593,6 @@ To search for individual instances of dependency, exception, and method reports,
596593
* No data? [Set firewall exceptions](./ip-addresses.md)
597594
* [Troubleshooting Java](java-2x-troubleshoot.md)
598595

599-
<!--START ARTICLE: Filter telemetry-->
600596
## Filter telemetry in your Java web app
601597

602598
Filters provide a way to select the telemetry that your [Java web app sends to Application Insights](#get-started-with-application-insights-in-a-java-web-project). There are some out-of-the-box filters that you can use, and you can also write your own custom filters.
@@ -849,7 +845,6 @@ You will need to create your own filter parameters in `application.properties` a
849845

850846
* Check that you have provided valid parameter values. For example, durations should be integers. Invalid values will cause the filter to be ignored. If your custom filter throws an exception from a constructor or set method, it will be ignored.
851847

852-
<!--START ARTICLE: Unix metrics -->
853848
## collectd: Linux performance metrics in Application Insights [Deprecated]
854849

855850
To explore Linux system performance metrics in [Application Insights](./app-insights-overview.md), install [collectd](https://collectd.org/), together with its Application Insights plug-in. This open-source solution gathers various system and network statistics.
@@ -958,7 +953,6 @@ Symptom: The collectd log shows errors that include "AI: ... SyntaxError: Unexpe
958953

959954
Workaround: Exclude data collected by the problem Write plugins.
960955

961-
<!--START ARTICLE: Micrometer Metrics -->
962956
## How to use Micrometer with Azure Application Insights Java SDK (not recommended)
963957

964958
Micrometer application monitoring measures metrics for JVM-based application code and lets you export the data to your favorite monitoring systems. This section will teach you how to use Micrometer with Application Insights for both Spring Boot and non-Spring Boot applications.
@@ -1086,34 +1080,7 @@ Steps:
10861080
</dependency>
10871081
```
10881082

1089-
2. Put `ApplicationInsights.xml` file in the resources folder:
1090-
1091-
```xml
1092-
<?xml version="1.0" encoding="utf-8"?>
1093-
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings" schemaVersion="2014-05-30">
1094-
1095-
<!-- The key from the portal: -->
1096-
<InstrumentationKey>** Your instrumentation key **</InstrumentationKey>
1097-
1098-
<!-- HTTP request component (not required for bare API) -->
1099-
<TelemetryModules>
1100-
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebRequestTrackingTelemetryModule"/>
1101-
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebSessionTrackingTelemetryModule"/>
1102-
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebUserTrackingTelemetryModule"/>
1103-
</TelemetryModules>
1104-
1105-
<!-- Events correlation (not required for bare API) -->
1106-
<!-- These initializers add context data to each event -->
1107-
<TelemetryInitializers>
1108-
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebOperationIdTelemetryInitializer"/>
1109-
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebOperationNameTelemetryInitializer"/>
1110-
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebSessionTelemetryInitializer"/>
1111-
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebUserTelemetryInitializer"/>
1112-
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebUserAgentTelemetryInitializer"/>
1113-
</TelemetryInitializers>
1114-
1115-
</ApplicationInsights>
1116-
```
1083+
2. If you haven't already, add `ApplicationInsights.xml` file in the resources folder. For more information, see [Add an ApplicationInsights.xml file](#add-an-applicationinsightsxml-file).
11171084

11181085
3. Sample Servlet class (emits a timer metric):
11191086

@@ -1220,7 +1187,7 @@ Add the following binding code to the configuration file:
12201187
## Next steps
12211188
* Add [monitoring to your web pages](javascript.md) to monitor page load times, AJAX calls, browser exceptions.
12221189
* Write [custom telemetry](./api-custom-events-metrics.md) to track usage in the browser or at the server.
1223-
* Use [Analytics](../logs/log-query-overview.md) for powerful queries over telemetry from your app
1190+
* Use [Analytics](../logs/log-query-overview.md) for powerful queries over telemetry from your app
12241191
* [Diagnostic search][diagnostic]
12251192
* [Sampling](./sampling.md) - Consider sampling as an alternative to filtering that does not skew your metrics.
12261193
* To learn more about Micrometer, see the official [Micrometer documentation](https://micrometer.io/docs).

0 commit comments

Comments
 (0)