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
This article shows you how to collect Spring Cloud Resilience4j Circuit Breaker Metrics with Application Insights Java in-process agent. With this feature, you can monitor metrics of resilience4j circuit breaker from Application Insights with Micrometer.
19
+
This article shows how to collect Spring Cloud Resilience4j Circuit Breaker Metrics with the Application Insights Java in-process agent. With this feature, you can monitor metrics of resilience4j circuit breaker from Application Insights with Micrometer.
20
20
21
-
We use the [spring-cloud-circuit-breaker-demo](https://github.com/spring-cloud-samples/spring-cloud-circuitbreaker-demo)to show how it works.
21
+
The demo [spring-cloud-circuit-breaker-demo](https://github.com/spring-cloud-samples/spring-cloud-circuitbreaker-demo)shows how the monitoring works.
22
22
23
23
## Prerequisites
24
24
25
25
* Enable Java In-Process agent from the [Java In-Process Agent for Application Insights guide](./how-to-application-insights.md#manage-application-insights-using-the-azure-portal).
26
26
* Enable dimension collection for resilience4j metrics from the [Application Insights guide](../azure-monitor/app/pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-pre-aggregation).
27
-
* Install git, Maven, and Java, if not already in use by the development computer.
27
+
* Install Git, Maven, and Java, if not already installed on the development computer.
28
28
29
29
## Build and deploy apps
30
30
@@ -40,12 +40,12 @@ Use the following procedure to build and deploy the sample applications.
40
40
1. Create applications with endpoints.
41
41
42
42
```azurecli
43
-
az spring app create
44
-
--resource-group ${resource-group-name} \
45
-
--name resilience4j \
46
-
--service ${Azure-Spring-Apps-instance-name} \
47
-
--assign-endpoint
48
-
az spring app create \
43
+
az spring app create
44
+
--resource-group ${resource-group-name} \
45
+
--name resilience4j \
46
+
--service ${Azure-Spring-Apps-instance-name} \
47
+
--assign-endpoint
48
+
az spring app create \
49
49
--resource-group ${resource-group-name} \
50
50
--service ${Azure-Spring-Apps-instance-name} \
51
51
--name reactive-resilience4j \
@@ -55,12 +55,12 @@ Use the following procedure to build and deploy the sample applications.
@@ -78,7 +78,7 @@ Use the following procedure to build and deploy the sample applications.
78
78
> </dependency>
79
79
> ```
80
80
>
81
-
> * The customer code must use the API of `CircuitBreakerFactory`, which is implemented as a `bean` automatically created when you include a Spring Cloud Circuit Breaker starter. For details see [Spring Cloud Circuit Breaker](https://spring.io/projects/spring-cloud-circuitbreaker#overview).
81
+
> * The customer code requires the `CircuitBreakerFactory` API, which is implemented as a `bean` automatically created when you include a Spring Cloud Circuit Breaker starter. For details see [Spring Cloud Circuit Breaker](https://spring.io/projects/spring-cloud-circuitbreaker#overview).
82
82
>
83
83
> * The following two dependencies have conflicts with resilient4j packages. Be sure the customer does not include them.
84
84
>
@@ -108,29 +108,29 @@ Use the following procedure to build and deploy the sample applications.
108
108
109
109
:::image type="content" source="media/how-to-circuit-breaker-metrics/application-insights.png" alt-text="Screenshot of the Azure portal showing the Azure Spring Apps Application Insights page with the Application Insights on the button bar highlighted." lightbox="media/how-to-circuit-breaker-metrics/application-insights.png":::
110
110
111
-
1. Select **Metrics** in the navigation pane. The Metrics page provides dropdown menus and options from which you'll define the charts in this procedure. For all charts, set the **Metric Namespace**, to **azure.applicationinsights**.
111
+
1. Select **Metrics** in the navigation pane. The Metrics page provides dropdown menus and options to define the charts in this procedure. For all charts, set the **Metric Namespace**, to **azure.applicationinsights**.
112
112
113
113
:::image type="content" source="media/how-to-circuit-breaker-metrics/chart-menus.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page, with Metrics highlighted in the navigation pane, and with azure-applicationinsights highlighted in the Metric Namespace dropdown menu." lightbox="media/how-to-circuit-breaker-metrics/chart-menus.png":::
114
114
115
-
1. For the first chart, select **resilience4j_circuitbreaker_buffered_calls** for the **Metric** with the **Aggregation** set to **Avg**.
115
+
1. Select **resilience4j_circuitbreaker_buffered_calls** for the **Metric** with the **Aggregation** set to **Avg**.
116
116
117
-
:::image type="content" source="media/how-to-circuit-breaker-metrics/buffered-calls.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart of the circuit breaker buffered calls metric and averaged." lightbox="media/how-to-circuit-breaker-metrics/buffered-calls.png":::
117
+
:::image type="content" source="media/how-to-circuit-breaker-metrics/buffered-calls.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart of the circuit breaker buffered calls selected for the Metric and with Average selected for the Aggregation." lightbox="media/how-to-circuit-breaker-metrics/buffered-calls.png":::
118
118
119
-
1. For the next chart, select **resilience4j_circuitbreaker_calls** for the **Metric** with the **Aggregation** set to **Avg**.
119
+
1. Select **resilience4j_circuitbreaker_calls** for the **Metric** with the **Aggregation** set to **Avg**.
120
120
121
-
:::image type="content" source="media/how-to-circuit-breaker-metrics/calls.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart of the circuit breaker calls metric and averaged." lightbox="media/how-to-circuit-breaker-metrics/calls.png":::
121
+
:::image type="content" source="media/how-to-circuit-breaker-metrics/calls.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart of the circuit breaker calls selected for the Metric and with Average selected for the Aggregation." lightbox="media/how-to-circuit-breaker-metrics/calls.png":::
122
122
123
123
1. Select **resilience4j_circuitbreaker_calls** for the **Metric** with the **Aggregation** set to **Avg**. Select **Add filter** and for the name select **Delay**.
124
124
125
-
:::image type="content" source="media/how-to-circuit-breaker-metrics/calls-filter.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart of the circuit breaker calls metric, averaged, and with a filter applied." lightbox="media/how-to-circuit-breaker-metrics/calls-filter.png":::
125
+
:::image type="content" source="media/how-to-circuit-breaker-metrics/calls-filter.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart of the circuit breaker calls selected for the Metric, with Average selected for the Aggregation, and with Delay selected for the filter." lightbox="media/how-to-circuit-breaker-metrics/calls-filter.png":::
126
126
127
-
1. Select **resilience4j_circuitbreaker_calls** for the **Metric** with the **Aggregation** set to **Avg**. Select **Apply splitting** and then select **kind**.
127
+
1. Select **resilience4j_circuitbreaker_calls** for the **Metric** with the **Aggregation** set to **Avg**. Select **Apply splitting** and select **kind**.
128
128
129
-
:::image type="content" source="media/how-to-circuit-breaker-metrics/calls-splitting.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart of the circuit breaker calls metric, averaged, and with Apply splitting applied." lightbox="media/how-to-circuit-breaker-metrics/calls-splitting.png":::
129
+
:::image type="content" source="media/how-to-circuit-breaker-metrics/calls-splitting.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart of the circuit breaker calls selected for the Metric, with Average selected for the Aggregation, and with kind selected for Apply splitting." lightbox="media/how-to-circuit-breaker-metrics/calls-splitting.png":::
130
130
131
-
1. For the last chart, select **resilience4j_circuitbreaker_calls** for the **Metric** with the **Aggregation** set to **Avg**. Select **Add metric** and select **resilience4j_circuitbreaker_buffered_calls** for the **Metric** with the **Aggregation** set to **Avg**. Repeat to add the metric **resilience4j_circuitbreaker_slow_calls** with the **Aggregation** set to **Avg**.
131
+
1. Select **resilience4j_circuitbreaker_calls** for the **Metric** with the **Aggregation** set to **Avg**. Select **Add metric** and select **resilience4j_circuitbreaker_buffered_calls** for the **Metric** with the **Aggregation** set to **Avg**. Repeat to add the metric **resilience4j_circuitbreaker_slow_calls** with the **Aggregation** set to **Avg**.
132
132
133
-
:::image type="content" source="media/how-to-circuit-breaker-metrics/slow-calls.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing a chart rendered from two metrics and averaged." lightbox="media/how-to-circuit-breaker-metrics/slow-calls.png":::
133
+
:::image type="content" source="media/how-to-circuit-breaker-metrics/slow-calls.png" alt-text="Screenshot of the Azure portal Application Insights Metrics page showing three charts: circuit breaker calls, circuit breaker buffered calls, and circuit breaker slow calls. All charts have aggregation set to Average." lightbox="media/how-to-circuit-breaker-metrics/slow-calls.png":::
0 commit comments