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/deprecated-java-2x.md
+7-40Lines changed: 7 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
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.
4
4
ms.topic: conceptual
5
5
ms.date: 12/07/2022
6
6
ms.devlang: java
@@ -15,9 +15,9 @@ ms.reviewer: mmcc
15
15
>
16
16
> Documentation for the latest version can be found at [Application Insights Java 3.x](./java-in-process-agent.md).
17
17
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:
19
19
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
21
21
- Send trace logs to Application Insights and explore them using the Application Insights portal.
22
22
- Monitor dependencies, caught exceptions, and method execution times in Java web apps
23
23
- 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
28
28
29
29
## Get started with Application Insights in a Java web project
30
30
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.
32
32
33
33
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.
34
34
@@ -301,7 +301,6 @@ See the dedicated [troubleshooting article](/troubleshoot/azure/azure-monitor/ap
## Explore Java trace logs in Application Insights
306
305
307
306
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
481
480
482
481
:::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":::
483
482
484
-
<!-- START ARTICLE: Dependencies -->
485
-
486
483
## Monitor dependencies, caught exceptions, and method execution times in Java web apps
487
484
488
485
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,
596
593
* No data? [Set firewall exceptions](./ip-addresses.md)
597
594
*[Troubleshooting Java](java-2x-troubleshoot.md)
598
595
599
-
<!--START ARTICLE: Filter telemetry-->
600
596
## Filter telemetry in your Java web app
601
597
602
598
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
849
845
850
846
* 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.
851
847
852
-
<!--START ARTICLE: Unix metrics -->
853
848
## collectd: Linux performance metrics in Application Insights [Deprecated]
854
849
855
850
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
958
953
959
954
Workaround: Exclude data collected by the problem Write plugins.
960
955
961
-
<!--START ARTICLE: Micrometer Metrics -->
962
956
## How to use Micrometer with Azure Application Insights Java SDK (not recommended)
963
957
964
958
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:
1086
1080
</dependency>
1087
1081
```
1088
1082
1089
-
2. Put `ApplicationInsights.xml` file in the resources folder:
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).
1117
1084
1118
1085
3. Sample Servlet class (emits a timer metric):
1119
1086
@@ -1220,7 +1187,7 @@ Add the following binding code to the configuration file:
1220
1187
## Next steps
1221
1188
* Add [monitoring to your web pages](javascript.md) to monitor page load times, AJAX calls, browser exceptions.
1222
1189
* 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
1224
1191
*[Diagnostic search][diagnostic]
1225
1192
*[Sampling](./sampling.md) - Consider sampling as an alternative to filtering that does not skew your metrics.
1226
1193
* To learn more about Micrometer, see the official [Micrometer documentation](https://micrometer.io/docs).
0 commit comments