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/correlation.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,11 @@ public void ConfigureServices(IServiceCollection services)
125
125
126
126
### Enable W3C distributed tracing support for Java apps
127
127
128
+
#### Java 3.0 agent
129
+
130
+
Java 3.0 agent supports W3C out of the box and no additional configuration is needed.
131
+
132
+
#### Java SDK
128
133
-**Incoming configuration**
129
134
130
135
- For Java EE apps, add the following to the `<TelemetryModules>` tag in ApplicationInsights.xml:
@@ -316,18 +321,33 @@ There's a new HTTP module, [Microsoft.AspNet.TelemetryCorrelation](https://www.n
316
321
The Application Insights SDK, starting with version 2.4.0-beta1, uses `DiagnosticSource` and `Activity` to collect telemetry and associate it with the current activity.
317
322
318
323
<a name="java-correlation"></a>
319
-
## Telemetry correlation in the Java
324
+
## Telemetry correlation in Java
320
325
321
-
[Application Insights Java agent](https://docs.microsoft.com/azure/azure-monitor/app/java-in-process-agent) as well as [Java SDK](../../azure-monitor/app/java-get-started.md) version 2.0.0 or later supports automatic correlation of telemetry. It automatically populates `operation_id` for all telemetry (like traces, exceptions, and custom events) issued within the scope of a request. It also propagates the correlation headers (described earlier) for service-to-service calls via HTTP, if the [Java SDK agent](../../azure-monitor/app/java-agent.md) is configured.
326
+
[Java agent](https://docs.microsoft.com/azure/azure-monitor/app/java-in-process-agent) as well as [Java SDK](../../azure-monitor/app/java-get-started.md) version 2.0.0 or later supports automatic correlation of telemetry. It automatically populates `operation_id` for all telemetry (like traces, exceptions, and custom events) issued within the scope of a request. It also propagates the correlation headers (described earlier) for service-to-service calls via HTTP, if the [Java SDK agent](../../azure-monitor/app/java-agent.md) is configured.
322
327
323
328
> [!NOTE]
324
329
> Application Insights Java agent auto-collects requests and dependencies for JMS, Kafka, Netty/Webflux, and more. For Java SDK only calls made via Apache HttpClient are supported for the correlation feature. Automatic context propagation across messaging technologies (like Kafka, RabbitMQ, and Azure Service Bus) isn't supported in the SDK.
325
330
326
-
<a name="java-role-name"></a>
327
-
## Role name
331
+
> [!NOTE]
332
+
> To collect custom telemetry you need to instrument the application with Java 2.6 SDK.
333
+
334
+
### Role names
328
335
329
336
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 taking one of the following actions:
330
337
338
+
- For Application Insights Java agent 3.0, set the cloud role name as follows:
339
+
340
+
```json
341
+
{
342
+
"instrumentationSettings": {
343
+
"preview": {
344
+
"roleName": "my cloud role name"
345
+
}
346
+
}
347
+
}
348
+
```
349
+
You can also set the cloud role name using the environment variable `APPLICATIONINSIGHTS_ROLE_NAME`.
350
+
331
351
- With Application Insights Java SDK 2.5.0 and later, you can specify the `cloud_RoleName`
332
352
by adding `<RoleName>` to your ApplicationInsights.xml file:
0 commit comments