Skip to content

Commit 2478473

Browse files
committed
Merge branch 'jbasden-rebase-java-otel-merge' of https://github.com/v-jbasden/azure-docs-pr into jbasden-rebase-java-otel-merge
2 parents aa860b1 + 5114091 commit 2478473

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

articles/azure-monitor/app/opentelemetry-enable.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Follow the steps in this section to instrument your application with OpenTelemet
3838
- An Azure subscription: [Create an Azure subscription for free](https://azure.microsoft.com/free/)
3939
- An Application Insights resource: [Create an Application Insights resource](create-workspace-resource.md#create-a-workspace-based-resource)
4040

41+
<!---NOTE TO CONTRIBUTORS: PLEASE DO NOT SEPARATE OUT JAVASCRIPT AND TYPESCRIPT INTO DIFFERENT TABS.--->
42+
4143
### [.NET](#tab/net)
4244

4345
- Application using an officially supported version of [.NET Core](https://dotnet.microsoft.com/download/dotnet) or [.NET Framework](https://dotnet.microsoft.com/download/dotnet-framework) that's at least .NET Framework 4.6.2
@@ -335,7 +337,7 @@ As part of using Application Insights instrumentation, we collect and send diagn
335337

336338
## Set the Cloud Role Name and the Cloud Role Instance
337339

338-
You might want to update the [Cloud Role Name](app-map.md#understand-the-cloud-role-name-within-the-context-of-an-application-map) and the Cloud Role Instance from the default values to something that makes sense to your team. They'll appear on the Application Map as the name underneath a node. Cloud Role Name uses `service.namespace` and `service.name` attributes, although it falls back to `service.name` if `service.namespace` isn't set. Cloud Role Instance uses the `service.instance.id` attribute value.
340+
You might want to update the [Cloud Role Name](app-map.md#understand-the-cloud-role-name-within-the-context-of-an-application-map) and the Cloud Role Instance from the default values to something that makes sense to your team. They'll appear on the Application Map as the name underneath a node.
339341

340342
### [.NET](#tab/net)
341343

@@ -734,7 +736,7 @@ Depending on your language and signal type, there are different ways to collect
734736

735737
- OpenTelemetry API
736738
- Language-specific logging/metrics libraries
737-
- Application Insights API
739+
- Application Insights Classic API
738740

739741
The following table represents the currently supported custom telemetry types:
740742

@@ -762,7 +764,7 @@ The following table represents the currently supported custom telemetry types:
762764
| &nbsp;&nbsp;&nbsp;AI Classic API | | | | | | | |
763765

764766
> [!NOTE]
765-
> Application Insights Java 3.x listens for telemetry that's sent to the Application Insights Java 2.x SDK. Similarly, Application Insights Node.js 3.x collects events created with the Application Insights API. This makes upgrading easier and fills a gap in our custom telemetry support until all custom telemetry types are supported via the OpenTelemetry API.
767+
> Application Insights Java 3.x listens for telemetry that's sent to the Application Insights Classic API. Similarly, Application Insights Node.js 3.x collects events created with the Application Insights Classic API. This makes upgrading easier and fills a gap in our custom telemetry support until all custom telemetry types are supported via the OpenTelemetry API.
766768
767769
### Add Custom Metrics
768770

@@ -791,7 +793,7 @@ The [OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetr
791793
describes the instruments and provides examples of when you might use each one.
792794

793795
> [!TIP]
794-
> The histogram is the most versatile and most closely equivalent to the prior Application Insights Track Metric API. Azure Monitor currently flattens the histogram instrument into our five supported aggregation types, and support for percentiles is underway. Although less versatile, other OpenTelemetry instruments have a lesser impact on your application's performance.
796+
> The histogram is the most versatile and most closely equivalent to the Application Insights Track Metric Classic API. Azure Monitor currently flattens the histogram instrument into our five supported aggregation types, and support for percentiles is underway. Although less versatile, other OpenTelemetry instruments have a lesser impact on your application's performance.
795797
796798
#### Histogram Example
797799

@@ -1092,9 +1094,9 @@ input()
10921094

10931095
### Add Custom Exceptions
10941096

1095-
Select instrumentation libraries automatically support exceptions to Application Insights.
1097+
Select instrumentation libraries automatically report exceptions to Application Insights.
10961098
However, you may want to manually report exceptions beyond what instrumentation libraries report.
1097-
For instance, exceptions caught by your code aren't* ordinarily reported. You may wish to report them
1099+
For instance, exceptions caught by your code aren't ordinarily reported. You may wish to report them
10981100
to draw attention in relevant experiences including the failures section and end-to-end transaction views.
10991101

11001102
#### [.NET](#tab/net)
@@ -1125,7 +1127,7 @@ You can use `opentelemetry-api` to update the status of a span and record except
11251127

11261128
```xml
11271129
<dependency>
1128-
<groupId>io.opentelemetry</groupId>
1130+
<groupId>io.opentelemetry.instrumentation</groupId>
11291131
<artifactId>opentelemetry-api</artifactId>
11301132
<version>1.0.0</version>
11311133
</dependency>
@@ -1219,7 +1221,7 @@ Coming soon.
12191221

12201222
#### [Java](#tab/java)
12211223

1222-
#### Use OpenTelemetry annotation
1224+
#### Use the OpenTelemetry annotation
12231225

12241226
The simplest way to add your own spans is by using OpenTelemetry's `@WithSpan` annotation.
12251227

@@ -1232,7 +1234,7 @@ Spans populate the `requests` and `dependencies` tables in Application Insights.
12321234

12331235
```xml
12341236
<dependency>
1235-
<groupId>io.opentelemetry</groupId>
1237+
<groupId>io.opentelemetry.instrumentation</groupId>
12361238
<artifactId>opentelemetry-instrumentation-annotations</artifactId>
12371239
<version>1.21.0</version>
12381240
</dependency>
@@ -1266,7 +1268,7 @@ you can add your spans by using the OpenTelemetry API.
12661268

12671269
```xml
12681270
<dependency>
1269-
<groupId>io.opentelemetry</groupId>
1271+
<groupId>io.opentelemetry.instrumentation</groupId>
12701272
<artifactId>opentelemetry-api</artifactId>
12711273
<version>1.0.0</version>
12721274
</dependency>
@@ -1330,7 +1332,7 @@ You can use `opentelemetry-api` to create span events, which populate the `trace
13301332
13311333
```xml
13321334
<dependency>
1333-
<groupId>io.opentelemetry</groupId>
1335+
<groupId>io.opentelemetry.instrumentation</groupId>
13341336
<artifactId>opentelemetry-api</artifactId>
13351337
<version>1.0.0</version>
13361338
</dependency>
@@ -1356,9 +1358,9 @@ Coming soon.
13561358
13571359
-->
13581360

1359-
### Send custom telemetry using the Application Insights API
1361+
### Send custom telemetry using the Application Insights Classic API
13601362

1361-
We recommend you use the OpenTelemetry APIs whenever possible, but there may be some scenarios when you have to use the Application Insights APIs.
1363+
We recommend you use the OpenTelemetry APIs whenever possible, but there may be some scenarios when you have to use the Application Insights Classic APIs.
13621364

13631365
#### [.NET](#tab/net)
13641366

@@ -1503,7 +1505,7 @@ public class ActivityEnrichingProcessor : BaseProcessor<Activity>
15031505

15041506
##### [Java](#tab/java)
15051507

1506-
You can use `opentelemetry-api` to add attributes to spans. These attributes can include adding a custom business dimension to your telemetry. You can also use attributes to set optional fields in the Application Insights schema, such as User ID or Client IP.
1508+
You can use `opentelemetry-api` to add attributes to spans.
15071509

15081510
Adding one or more span attributes populates the `customDimensions` field in the `requests`, `dependencies`, `traces`, or `exceptions` table.
15091511

@@ -1514,7 +1516,7 @@ Adding one or more span attributes populates the `customDimensions` field in the
15141516

15151517
```xml
15161518
<dependency>
1517-
<groupId>io.opentelemetry</groupId>
1519+
<groupId>io.opentelemetry.instrumentation</groupId>
15181520
<artifactId>opentelemetry-api</artifactId>
15191521
<version>1.0.0</version>
15201522
</dependency>
@@ -1614,7 +1616,7 @@ activity.SetTag("http.client_ip", "<IP Address>");
16141616

16151617
##### [Java](#tab/java)
16161618

1617-
Java automatically sets the user IP.
1619+
Java automatically populates this field.
16181620

16191621
##### [Node.js](#tab/nodejs)
16201622

@@ -1645,7 +1647,7 @@ span._attributes["http.client_ip"] = "<IP Address>"
16451647

16461648
#### Set the user ID or authenticated user ID
16471649

1648-
You can populate the _user_Id_ or _user_Authenticatedid_ field for requests by using the guidance below. User ID is an anonymous user identifier. Authenticated User ID is a known user identifier.
1650+
You can populate the _user_Id_ or _user_AuthenticatedId_ field for requests by using the guidance below. User ID is an anonymous user identifier. Authenticated User ID is a known user identifier.
16491651

16501652
> [!IMPORTANT]
16511653
> Consult applicable privacy laws before you set the Authenticated User ID.
@@ -1658,7 +1660,6 @@ Coming soon.
16581660

16591661
Populate the `user ID` field in the `requests`, `dependencies`, or `exceptions` table.
16601662

1661-
Consult applicable privacy laws before you set the Authenticated User ID.
16621663

16631664
> [!NOTE]
16641665
> This feature is only in 3.2.0 and later.
@@ -1667,7 +1668,7 @@ Consult applicable privacy laws before you set the Authenticated User ID.
16671668

16681669
```xml
16691670
<dependency>
1670-
<groupId>io.opentelemetry</groupId>
1671+
<groupId>io.opentelemetry.instrumentation</groupId>
16711672
<artifactId>opentelemetry-api</artifactId>
16721673
<version>1.0.0</version>
16731674
</dependency>
@@ -1910,7 +1911,7 @@ Coming soon.
19101911

19111912
#### [Java](#tab/java)
19121913

1913-
You can use `opentelemetry-api` to get the trace ID or span ID. This action can be done to add these identifiers to existing logging telemetry to improve correlation when you debug and diagnose issues.
1914+
You can use `opentelemetry-api` to get the trace ID or span ID.
19141915

19151916
> [!NOTE]
19161917
> This feature is only in 3.2.0 and later.
@@ -1919,7 +1920,7 @@ You can use `opentelemetry-api` to get the trace ID or span ID. This action can
19191920

19201921
```xml
19211922
<dependency>
1922-
<groupId>io.opentelemetry</groupId>
1923+
<groupId>io.opentelemetry.instrumentation</groupId>
19231924
<artifactId>opentelemetry-api</artifactId>
19241925
<version>1.0.0</version>
19251926
</dependency>
@@ -2033,7 +2034,7 @@ Coming soon.
20332034

20342035
### Offline Storage and Automatic Retries
20352036

2036-
To improve reliability and resiliency, Azure Monitor OpenTelemetry-based offerings write to offline/local storage by default when an application loses its connection with Application Insights. It saves the application telemetry to disk and periodically tries to send it again for up to 48 hours. In addition to exceeding the allowable time, telemetry will occasionally be dropped in high-load applications when the maximum file size is exceeded or the SDK doesn't have an opportunity to clear out the file. If we need to choose, the product will save more recent events over old ones. In some cases, you may wish to disable this feature to optimize application performance. [Learn More](data-retention-privacy.md#does-the-sdk-create-temporary-local-storage)
2037+
To improve reliability and resiliency, Azure Monitor OpenTelemetry-based offerings write to offline/local storage by default when an application loses its connection with Application Insights. It saves the application telemetry to disk and periodically tries to send it again for up to 48 hours. In addition to exceeding the allowable time, telemetry will occasionally be dropped in high-load applications when the maximum file size is exceeded or the SDK doesn't have an opportunity to clear out the file. If we need to choose, the product will save more recent events over old ones. [Learn More](data-retention-privacy.md#does-the-sdk-create-temporary-local-storage)
20372038

20382039
#### [.NET](#tab/net)
20392040

0 commit comments

Comments
 (0)