dotnet / dotnet/dotnet-api-docs
Documentation for ActivitySource.CreateActivity/StartActivity missing important information about behavior for default Context
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
Regarding these documentation pages:
[https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.activitysource.createactivity](ActivitySource.CreateActivity)
[https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.activitysource.startactivity](ActivitySource.StartActivity)
When one of the following conditions are true:
- `parentContext` argument is `default`, or
- `parentId` argument is `default`, or
- method does not take either of those two arguments,
then the methods parent the new `Activity` to `Activity.Current`.
This is critical information. Discussion can be found in [this thread](https://github.com/dotnet/runtime/issues/65528#issuecomment-1068855998)
cc @tarekgh
Contributor guide
Assessment
This issue has not been assessed yet.