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
<InstrumentationKey>** Your instrumentation key **</InstrumentationKey>
186
+
<RoleName>** Your role name **</RoleName>
187
+
...
188
+
</ApplicationInsights>
189
+
```
190
+
179
191
If you use Spring Boot with the Application Insights Spring Boot starter, the only required change is to set your custom name for the application in the application.properties file.
180
192
181
193
`spring.application.name=<name-of-app>`
182
194
183
195
The Spring Boot starter will automatically assign cloud role name to the value you enter for the spring.application.name property.
184
196
185
-
For further information on Java correlation and how to configure cloud role name for non-SpringBoot applications checkout this [section](https://docs.microsoft.com/azure/application-insights/application-insights-correlation#role-name) on correlation.
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/correlation.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -331,25 +331,23 @@ In order to correlate telemetry in Asynchronous Spring Boot application, please
331
331
332
332
At times, you might want to customize the way component names are displayed in the [Application Map](../../azure-monitor/app/app-map.md). To do so, you can manually set the `cloud_RoleName` by doing one of the following:
333
333
334
-
- If you use Spring Boot with the Application Insights Spring Boot starter, the only required change is to set your custom name for the application in the application.properties file.
335
-
336
-
`spring.application.name=<name-of-app>`
337
-
338
-
The Spring Boot starter automatically assigns `cloudRoleName` to the value you enter for the `spring.application.name` property.
339
-
340
-
- If you're using the `WebRequestTrackingFilter`, the `WebAppNameContextInitializer` sets the application name automatically. Add the following to your configuration file (ApplicationInsights.xml):
334
+
- Starting with Application Insights Java SDK 2.5.0, you can specify the cloud role name
335
+
by adding `<RoleName>` to your `ApplicationInsights.xml` file, e.g.
<InstrumentationKey>** Your instrumentation key **</InstrumentationKey>
341
+
<RoleName>** Your role name **</RoleName>
342
+
...
343
+
</ApplicationInsights>
346
344
```
347
345
348
-
- If you use the cloud context class:
346
+
- If you use Spring Boot with the Application Insights Spring Boot starter, the only required change is to set your custom name for the application in the application.properties file.
0 commit comments