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
By default, the span ends up in the `dependencies` table with dependency type `InProc`.
1404
-
1405
-
For methods representing a background job not captured by autoinstrumentation, we recommend applying the attribute `kind = SpanKind.SERVER` to the `@WithSpan` annotation to ensure they appear in the Application Insights `requests` table.
1379
+
The simplest way to add your own spans is by using OpenTelemetry's `@WithSpan` annotation.
1380
+
1381
+
Spans populate the `requests` and `dependencies` tables in Application Insights.
1382
+
1383
+
1. Add `opentelemetry-instrumentation-annotations-1.32.0.jar` (or later) to your application:
By default, the span ends up in the `dependencies` table with dependency type `InProc`.
1404
+
1405
+
For methods representing a background job not captured by autoinstrumentation, we recommend applying the attribute `kind = SpanKind.SERVER` to the `@WithSpan` annotation to ensure they appear in the Application Insights `requests` table.
1406
1406
1407
1407
**Use the OpenTelemetry API**
1408
1408
1409
-
If the preceding OpenTelemetry `@WithSpan` annotation doesn't meet your needs,
1410
-
you can add your spans by using the OpenTelemetry API.
1411
-
1412
-
1. Add `opentelemetry-api-1.0.0.jar` (or later) to your application:
1413
-
1414
-
```xml
1415
-
<dependency>
1416
-
<groupId>io.opentelemetry</groupId>
1417
-
<artifactId>opentelemetry-api</artifactId>
1418
-
<version>1.0.0</version>
1419
-
</dependency>
1420
-
```
1421
-
1422
-
1. Use the `GlobalOpenTelemetry` class to create a `Tracer`:
0 commit comments