Skip to content

Commit 9e10379

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into heidist-fresh3
2 parents 06b0c51 + ad230ab commit 9e10379

29 files changed

+353
-52
lines changed

articles/aks/private-clusters.md

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -97,45 +97,11 @@ The following parameters can be leveraged to configure Private DNS Zone.
9797
```azurecli-interactive
9898
az aks create -n <private-cluster-name> -g <private-cluster-resource-group> --load-balancer-sku standard --enable-private-cluster --enable-managed-identity --assign-identity <ResourceId> --private-dns-zone [system|none]
9999
```
100-
### Create a private AKS cluster with a BYO Private DNS SubZone (Preview)
100+
### Create a private AKS cluster with a BYO Private DNS SubZone
101101

102102
Prerequisites:
103103

104-
* Azure CLI >= 2.29.0 or Azure CLI with aks-preview extension 0.5.34 or later.
105-
106-
### Register the `EnablePrivateClusterSubZone` preview feature
107-
108-
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
109-
110-
To create an AKS private cluster with SubZone, you must enable the `EnablePrivateClusterSubZone` feature flag on your subscription.
111-
112-
Register the `EnablePrivateClusterSubZone` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
113-
114-
```azurecli-interactive
115-
az feature register --namespace "Microsoft.ContainerService" --name "EnablePrivateClusterSubZone"
116-
```
117-
118-
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature list][az-feature-list] command:
119-
120-
```azurecli-interactive
121-
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/EnablePrivateClusterSubZone')].{Name:name,State:properties.state}"
122-
```
123-
124-
When ready, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
125-
126-
```azurecli-interactive
127-
az provider register --namespace Microsoft.ContainerService
128-
```
129-
130-
### Install the aks-preview CLI extension
131-
132-
```azurecli-interactive
133-
# Install the aks-preview extension
134-
az extension add --name aks-preview
135-
136-
# Update the extension to make sure you have the latest version installed
137-
az extension update --name aks-preview
138-
```
104+
* Azure CLI >= 2.32.0 or later.
139105

140106
### Create a private AKS cluster with Custom Private DNS Zone or Private DNS SubZone
141107

articles/devtest-labs/TOC.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
href: quickstarts/create-lab-rest.md
1616
- name: Tutorials
1717
items:
18-
- name: Set up a lab
18+
- name: Set up a lab (admins)
1919
href: tutorial-create-custom-lab.md
20-
- name: Access a lab
20+
- name: Access a lab (students)
2121
href: tutorial-use-custom-lab.md
2222
- name: Samples
2323
items:
@@ -49,23 +49,23 @@
4949
href: scripts/stop-delete-virtual-machine-in-lab-cli.md
5050
- name: Concepts
5151
items:
52-
- name: DevTest Labs concepts
52+
- name: Key concepts
5353
href: devtest-lab-concepts.md
54-
- name: Best practices for distributed and collaborative development
54+
- name: Best practices
5555
href: best-practices-distributive-collaborative-development-environment.md
5656
- name: Integration with Azure DevOps
5757
href: devtest-lab-dev-ops.md
5858
- name: Scenarios
5959
items:
60-
- name: Popular scenarios for using DevTest Labs
60+
- name: Popular scenarios
6161
href: devtest-lab-guidance-get-started.md
62-
- name: Use labs for developers
62+
- name: Labs for developers
6363
href: devtest-lab-developer-lab.md
64-
- name: Use labs for test environments
64+
- name: Labs for test environments
6565
href: devtest-lab-test-env.md
66-
- name: Use labs for training
66+
- name: Labs for training
6767
href: devtest-lab-training-lab.md
68-
- name: Scenarios for using claimable VMs
68+
- name: Claimable VMs
6969
href: devtest-lab-use-claim-capabilities.md
7070
- name: Security
7171
items:
@@ -258,9 +258,9 @@
258258
href: deliver-proof-concept.md
259259
- name: Scale up your DevTest Labs deployment
260260
href: devtest-lab-guidance-scale.md
261-
- name: Orchestrate the implementation of DevTest Labs
261+
- name: Orchestrate the implementation
262262
href: devtest-lab-guidance-orchestrate-implementation.md
263-
- name: Governance of DevTest Labs infrastructure
263+
- name: Governance
264264
items:
265265
- name: Resources
266266
href: devtest-lab-guidance-governance-resources.md
@@ -304,11 +304,7 @@
304304
href: https://azure.microsoft.com/updates/?product=devtest-lab
305305
- name: Pricing
306306
href: https://azure.microsoft.com/pricing/details/devtest-lab/
307-
- name: Microsoft Q&A question page
307+
- name: Microsoft Q&A page
308308
href: /answers/topics/azure-devtestlabs.html
309-
- name: Stack Overflow
310-
href: https://stackoverflow.com/questions/tagged/azure-devtest-labs
311-
- name: Videos
312-
href: https://azure.microsoft.com/resources/videos/index/?services=devtest-lab
313309
- name: Frequently asked questions
314310
href: devtest-lab-faq.yml
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
---
2+
title: How to monitor Spring Boot apps with Elastic APM Java Agent
3+
description: How to use Elastic APM Java Agent to monitor Spring Boot applications running in Azure Spring Cloud
4+
author: karlerickson
5+
ms.author: karler
6+
ms.service: spring-cloud
7+
ms.topic: how-to
8+
ms.date: 12/07/2021
9+
ms.custom: devx-track-java
10+
---
11+
12+
# How to monitor Spring Boot apps with Elastic APM Java Agent
13+
14+
This article explains how to use Elastic APM Agent to monitor Spring Boot applications running in Azure Spring Cloud.
15+
16+
With the Elastic Observability Solution, you can achieve unified observability to:
17+
18+
* Monitor apps using the Elastic APM Java Agent and using persistent storage with Azure Spring Cloud.
19+
* Use diagnostic settings to ship Azure Spring Cloud logs to Elastic. For more information, see [Analyze logs with Elastic (ELK) using diagnostics settings](https://github.com/hemantmalik/azure-docs/blob/master/articles/spring-cloud/how-to-elastic-diagnostic-settings.md).
20+
21+
The following video introduces unified observability for Spring Boot applications using Elastic.
22+
23+
<br>
24+
25+
> [!VIDEO https://www.youtube.com/embed/KjmQX1SxZdA]
26+
27+
## Prerequisites
28+
29+
* [Azure CLI](/cli/azure/install-azure-cli)
30+
* [Deploy Elastic on Azure](https://www.elastic.co/blog/getting-started-with-the-azure-integration-enhancement)
31+
* [Elastic APM Endpoint and Secret Token from the Elastic Deployment](https://www.elastic.co/guide/en/cloud/current/ec-manage-apm-and-fleet.html)
32+
33+
## Deploy the Spring Petclinic application
34+
35+
This article uses the Spring Petclinic sample to walk through the required steps. Use the following steps to deploy the sample application:
36+
37+
1. Follow the steps in [Deploy Spring Boot apps using Azure Spring Cloud and MySQL](https://github.com/Azure-Samples/spring-petclinic-microservices#readme) until you reach the [Deploy Spring Boot applications and set environment variables](https://github.com/Azure-Samples/spring-petclinic-microservices#deploy-spring-boot-applications-and-set-environment-variables) section.
38+
39+
1. Use the Azure Spring Cloud extension for Azure CLI with the following command to create an application to run in Azure Spring Cloud:
40+
41+
```azurecli
42+
az spring-cloud app create \
43+
--resource-group <your-resource-group-name> \
44+
--service <your-Azure-Spring-Cloud-instance-name> \
45+
--name <your-app-name> \
46+
--is-public true
47+
```
48+
49+
## Enable custom persistent storage for Azure Spring Cloud
50+
51+
Use the following steps to enable custom persistent storage:
52+
53+
1. Follow the steps in [How to enable your own persistent storage in Azure Spring Cloud](how-to-custom-persistent-storage.md).
54+
55+
1. Use the following Azure CLI command to add persistent storage for your Azure Spring Cloud apps.
56+
57+
```azurecli
58+
az spring-cloud app append-persistent-storage \
59+
--resource-group <your-resource-group-name> \
60+
--service <your-Azure-Spring-Cloud-instance-name> \
61+
--name <your-app-name> \
62+
--persistent-storage-type AzureFileVolume \
63+
--share-name <your-Azure-file-share-name> \
64+
--mount-path <unique-mount-path> \
65+
--storage-name <your-mounted-storage-name>
66+
```
67+
68+
## Activate Elastic APM Java Agent
69+
70+
Before proceeding, you'll need your Elastic APM server connectivity information handy, which assumes you've deployed Elastic on Azure. For more information, see [How to deploy and manage Elastic on Microsoft Azure](https://www.elastic.co/blog/getting-started-with-the-azure-integration-enhancement). To get this information, use the following steps:
71+
72+
1. In the Azure portal, go to the **Overview** page of your Elastic deployment, then select **Manage Elastic Cloud Deployment**.
73+
74+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-get-link-from-microsoft-azure.png" alt-text="Azure portal screenshot of 'Elasticsearch (Elastic Cloud)' page." lightbox="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-get-link-from-microsoft-azure.png":::
75+
76+
1. Under your deployment on Elastic Cloud Console, select the **APM & Fleet** section to get Elastic APM Server endpoint and secret token.
77+
78+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-endpoint-secret.png" alt-text="Elastic screenshot 'APM & Fleet' page." lightbox="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-endpoint-secret.png":::
79+
80+
1. Download Elastic APM Java Agent from [Maven Central](https://search.maven.org/search?q=g:co.elastic.apm%20AND%20a:elastic-apm-agent).
81+
82+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/maven-central-repository-search.png" alt-text="Maven Central screenshot with jar download highlighted." lightbox="media/how-to-elastic-apm-java-agent-monitor/maven-central-repository-search.png":::
83+
84+
1. Upload Elastic APM Agent to the custom persistent storage you enabled earlier. Go to Azure Fileshare and select **Upload** to add the agent JAR file.
85+
86+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/upload-files-microsoft-azure.png" alt-text="Azure portal screenshot showing 'Upload files' pane of 'File share' page." lightbox="media/how-to-elastic-apm-java-agent-monitor/upload-files-microsoft-azure.png":::
87+
88+
1. After you have the Elastic APM endpoint and secret token, use the following command to activate Elastic APM Java agent when deploying applications. The placeholder *`<agent-location>`* refers to the mounted storage location of the Elastic APM Java Agent.
89+
90+
```azurecli
91+
az spring-cloud app deploy \
92+
--name <your-app-name> \
93+
--artifact-path <unique-path-to-your-app-jar-on-custom-storage> \
94+
--jvm-options='-javaagent:<agent-location>' \
95+
--env ELASTIC_APM_SERVICE_NAME=<your-app-name> \
96+
ELASTIC_APM_APPLICATION_PACKAGES='<your-app-package-name>' \
97+
ELASTIC_APM_SERVER_URL='<your-Elastic-APM-server-URL>' \
98+
ELASTIC_APM_SECRET_TOKEN='<your-Elastic-APM-secret-token>'
99+
```
100+
101+
## Automate provisioning
102+
103+
You can also run a provisioning automation pipeline using Terraform or an Azure Resource Manager template (ARM template). This pipeline can provide a complete hands-off experience to instrument and monitor any new applications that you create and deploy.
104+
105+
### Automate provisioning using Terraform
106+
107+
To configure the environment variables in a Terraform template, add the following code to the template, replacing the *\<...>* placeholders with your own values. For more information, see [Manages an Active Azure Spring Cloud Deployment](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/spring_cloud_active_deployment).
108+
109+
```terraform
110+
resource "azurerm_spring_cloud_java_deployment" "example" {
111+
...
112+
jvm_options = "-javaagent:<unique-path-to-your-app-jar-on-custom-storage>"
113+
...
114+
environment_variables = {
115+
"ELASTIC_APM_SERVICE_NAME"="<your-app-name>",
116+
"ELASTIC_APM_APPLICATION_PACKAGES"="<your-app-package>",
117+
"ELASTIC_APM_SERVER_URL"="<your-Elastic-APM-server-URL>",
118+
"ELASTIC_APM_SECRET_TOKEN"="<your-Elastic-APM-secret-token>"
119+
}
120+
}
121+
```
122+
123+
### Automate provisioning using an ARM template
124+
125+
To configure the environment variables in an ARM template, add the following code to the template, replacing the *\<...>* placeholders with your own values. For more information, see [Microsoft.AppPlatform Spring/apps/deployments](/azure/templates/microsoft.appplatform/spring/apps/deployments?tabs=json).
126+
127+
```arm
128+
"deploymentSettings": {
129+
"environmentVariables": {
130+
"ELASTIC_APM_SERVICE_NAME"="<your-app-name>",
131+
"ELASTIC_APM_APPLICATION_PACKAGES"="<your-app-package>",
132+
"ELASTIC_APM_SERVER_URL"="<your-Elastic-APM-server-URL>",
133+
"ELASTIC_APM_SECRET_TOKEN"="<your-Elastic-APM-secret-token>"
134+
},
135+
"jvmOptions": "-javaagent:<unique-path-to-your-app-jar-on-custom-storage>",
136+
...
137+
}
138+
```
139+
140+
## Upgrade Elastic APM Java Agent
141+
142+
To plan your upgrade, see [Upgrade versions](https://www.elastic.co/guide/en/cloud/current/ec-upgrade-deployment.html) for Elastic Cloud on Azure, and [Breaking Changes](https://www.elastic.co/guide/en/apm/server/current/breaking-changes.html) for APM. After you've upgraded APM Server, upload the Elastic APM Java agent JAR file in the custom persistent storage and restart apps with updated JVM options pointing to the upgraded Elastic APM Java agent JAR.
143+
144+
## Monitor applications and metrics with Elastic APM
145+
146+
Use the following steps to monitor applications and metrics:
147+
148+
1. In the Azure portal, go to the **Overview** page of your Elastic deployment, then select the Kibana link.
149+
150+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-get-kibana-link.png" alt-text="Azure portal screenshot showing Elasticsearch page with 'Deployment URL / Kibana' highlighted." lightbox="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-get-kibana-link.png":::
151+
152+
1. After Kibana is open, search for *APM* in the search bar, then select **APM**.
153+
154+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-kibana-search-apm.png" alt-text="Elastic / Kibana screenshot showing APM search results." lightbox="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-kibana-search-apm.png":::
155+
156+
Kibana APM is the curated application to support Application Monitoring workflows. Here you can view high-level details such as request/response times, throughput, transactions in a service with most impact on the duration.
157+
158+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-customer-service.png" alt-text="Elastic / Kibana screenshot showing APM Services Overview page." lightbox="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-customer-service.png":::
159+
160+
You can drill down in a specific transaction to understand the transaction-specific details such as the distributed tracing.
161+
162+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-customer-service-latency-distribution.png" alt-text="Elastic / Kibana screenshot showing APM Services Transactions page." lightbox="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-customer-service-latency-distribution.png":::
163+
164+
Elastic APM Java agent also captures the JVM metrics from the Azure Spring Cloud apps that are available with Kibana App for users for troubleshooting.
165+
166+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-customer-service-jvm-metrics.png" alt-text="Elastic / Kibana screenshot showing APM Services JVMs page." lightbox="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-customer-service-jvm-metrics.png":::
167+
168+
Using the inbuilt AI engine in the Elastic solution, you can also enable Anomaly Detection on the Azure Spring Cloud Services and choose an appropriate action - such as Teams notification, creation of a JIRA issue, a webhook-based API call, and others.
169+
170+
:::image type="content" source="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-alert-anomaly.png" alt-text="Elastic / Kibana screenshot showing APM Services page with 'Create rule' pane showing and Actions highlighted." lightbox="media/how-to-elastic-apm-java-agent-monitor/elastic-apm-alert-anomaly.png":::
171+
172+
## Next steps
173+
174+
* [Quickstart: Deploy your first Spring Boot app in Azure Spring Cloud](./quickstart.md)
175+
* [Deploy Elastic on Azure](https://www.elastic.co/blog/getting-started-with-the-azure-integration-enhancement)

0 commit comments

Comments
 (0)