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/app-map.md
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ To view active alerts and the underlying rules that cause the alerts to be trigg
81
81
82
82
Application Map uses the **cloud role name** property to identify the components on the map. The Application Insights SDK automatically adds the cloud role name property to the telemetry emitted by components. For example, the SDK will add a web site name or service role name to the cloud role name property. However, there are cases where you may want to override the default value. To override cloud role name and change what gets displayed on the Application Map:
83
83
84
-
### .NET/.NET Core
84
+
#[.NET/.NetCore](#tab/net)
85
85
86
86
**Write custom TelemetryInitializer as below.**
87
87
@@ -149,7 +149,27 @@ For [ASP.NET Core](asp-net-core.md#adding-telemetryinitializers) applications, a
149
149
}
150
150
```
151
151
152
-
### Node.js
152
+
# [Java](#tab/java)
153
+
154
+
Starting with Application Insights Java SDK 2.5.0, you can specify the cloud role name
155
+
by adding `<RoleName>` to your `ApplicationInsights.xml` file, e.g.
<InstrumentationKey>** Your instrumentation key **</InstrumentationKey>
161
+
<RoleName>** Your role name **</RoleName>
162
+
...
163
+
</ApplicationInsights>
164
+
```
165
+
166
+
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.
167
+
168
+
`spring.application.name=<name-of-app>`
169
+
170
+
The Spring Boot starter will automatically assign cloud role name to the value you enter for the spring.application.name property.
<InstrumentationKey>** Your instrumentation key **</InstrumentationKey>
182
-
<RoleName>** Your role name **</RoleName>
183
-
...
184
-
</ApplicationInsights>
185
-
```
186
-
187
-
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.
188
-
189
-
`spring.application.name=<name-of-app>`
190
-
191
-
The Spring Boot starter will automatically assign cloud role name to the value you enter for the spring.application.name property.
Alternatively, **cloud role instance** can be helpful for scenarios where **cloud role name** tells you the problem is somewhere in your web front-end, but you might be running your web front-end across multiple load-balanced servers so being able to drill in a layer deeper via Kusto queries and knowing if the issue is impacting all web front-end servers/instances or just one can be extremely important.
@@ -255,7 +256,7 @@ In addition, Application Map only supports up to 1000 separate ungrouped nodes r
255
256
256
257
To fix this, you'll need to change your instrumentation to properly set the cloud role name, dependency type, and dependency target fields.
257
258
258
-
* Dependency target should represent the logical name of a dependency. In many cases, it’s equivalent to the server or resource name of the dependency. For example, in the case of HTTP dependencies it is set to the hostname. It should not contain unique IDs or parameters that change from one request to another.
259
+
* Dependency target should represent the logical name of a dependency. In many cases, it's equivalent to the server or resource name of the dependency. For example, in the case of HTTP dependencies it is set to the hostname. It should not contain unique IDs or parameters that change from one request to another.
259
260
260
261
* Dependency type should represent the logical type of a dependency. For example, HTTP, SQL or Azure Blob are typical dependency types. It should not contain unique IDs.
0 commit comments