Skip to content

Commit 760f31b

Browse files
committed
modified telemetry correlation for Java
1 parent db65e71 commit 760f31b

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

articles/azure-monitor/app/correlation.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,18 +316,33 @@ There's a new HTTP module, [Microsoft.AspNet.TelemetryCorrelation](https://www.n
316316
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.
317317
318318
<a name="java-correlation"></a>
319-
## Telemetry correlation in the Java
319+
## Telemetry correlation in Java
320320
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.
321+
[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.
322322
323323
> [!NOTE]
324324
> 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.
325325
326-
<a name="java-role-name"></a>
327-
## Role name
326+
> [!NOTE]
327+
> To collect custom telemetry you need to instrument the application with Java 2.6 SDK.
328+
329+
### Role names
328330
329331
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:
330332
333+
- For Application Insights Java agent 3.0, set the cloud role name as follows:
334+
335+
```json
336+
{
337+
"instrumentationSettings": {
338+
"preview": {
339+
"roleName": "my cloud role name"
340+
}
341+
}
342+
}
343+
```
344+
You can also set the cloud role name using the environment variable APPLICATIONINSIGHTS_ROLE_NAME.
345+
331346
- With Application Insights Java SDK 2.5.0 and later, you can specify the `cloud_RoleName`
332347
by adding `<RoleName>` to your ApplicationInsights.xml file:
333348

0 commit comments

Comments
 (0)