Distributed tracing with links has wrong signature
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 19h 10m
- Merged PRs (30d)
- 268
Description
Hey there, I was checking on how to add links to distributed tracing and found out this [1] part which sets `parentContext` as null but, there is no signature in `StartActivity` where `parentContext` is optional, did I miss something?
Trying the following will return an error:
```csharp
_activitySource.StartActivity(ActivityKind.Consumer, parentContext: null);
```
```
Argument type 'null' is not assignable to parameter type 'System.Diagnostics.ActivityContext'
```
[1] https://docs.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-instrumentation-walkthroughs#optional-links
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 3f30f3b0-90cb-d2eb-ee08-4319ffcb7686
* Version Independent ID: dc4689df-b03a-e744-dbed-f23d8defcb6e
* Content: [Add distributed tracing instrumentation - .NET](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-instrumentation-walkthroughs)
* Content Source: [docs/core/diagnostics/distributed-tracing-instrumentation-walkthroughs.md](https://github.com/dotnet/docs/blob/main/docs/core/diagnostics/distributed-tracing-instrumentation-walkthroughs.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @tommcdon
* Microsoft Alias: **tommcdon**
Contributor guide
Assessment
This issue has not been assessed yet.