Skip to content

Commit 0a17ce6

Browse files
Merge pull request #240131 from TimothyMothra/patch-1
Update opentelemetry-enable.md - Better description for ActivityKind
2 parents cc78324 + f945d3c commit 0a17ce6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,9 +1137,9 @@ app.MapGet("/", () =>
11371137
app.Run();
11381138
```
11391139

1140-
By default, the activity ends up in the Application Insights `dependencies` table with dependency type `InProc`.
1141-
1142-
For code representing a background job not captured by an instrumentation library, we recommend setting `ActivityKind.Server` in the `StartActivity` method to ensure it appears in the Application Insights `requests` table.
1140+
When calling `StartActivity` it will default to `ActivityKind.Internal` but you can provide any other `ActivityKind`.
1141+
`ActivityKind.Client`, `ActivityKind.Producer`, and `ActivityKind.Internal` are mapped to Application Insights `dependencies`.
1142+
`ActivityKind.Server` and `ActivityKind.Consumer` are mapped to Application Insights `requests`.
11431143

11441144
#### [.NET](#tab/net)
11451145

@@ -1160,6 +1160,10 @@ using (var activity = activitySource.StartActivity("CustomActivity"))
11601160
}
11611161
```
11621162

1163+
When calling `StartActivity` it will default to `ActivityKind.Internal` but you can provide any other `ActivityKind`.
1164+
`ActivityKind.Client`, `ActivityKind.Producer`, and `ActivityKind.Internal` are mapped to Application Insights `dependencies`.
1165+
`ActivityKind.Server` and `ActivityKind.Consumer` are mapped to Application Insights `requests`.
1166+
11631167
#### [Java](#tab/java)
11641168

11651169
##### Use the OpenTelemetry annotation

0 commit comments

Comments
 (0)