How to create a root scope with v2 API
See original GitHub issueI’m not finding a way for my code to create a new root scope with the v2 API. With the v1 API, I was able to pass in true
to the ignoreActiveScope
parameter of Tracer.Instance.StartActive
. That’s no longer an option and not exposed on SpanCreationSettings
.
If I leave Parent
as null on SpanCreationSettings
, then the default behavior is to inherit. And if I try to set Parent
to a new empty SpanContext
, I cannot because the only public constructor requires I pass a ulong spanId
(not nullable) and I do not have access to the internal SpanIdGenerator
.
So am I missing something? Is there another way to create a root span?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
$rootScope.Scope
A root scope can be retrieved using the $rootScope key from the $injector. Child scopes are created using the $new() method. (Most scopes...
Read more >$rootScope
Scopes provide separation between the model and the view, via a mechanism for watching the model for changes. They also provide event emission/broadcast...
Read more >Angular JS Root Scope
First I call login and in login method I get authToken and then after set to rootScope at that time if I logged...
Read more >Angular Scopes
Root Scope. All applications have a $rootScope which is the scope created on the HTML element that contains the ng-app directive. The rootScope...
Read more >What is $scope and $rootScope
An app can have only one $rootScope. It is the scope that is created on the HTML element that contains the ng-app directive...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tylerohlsen @lucaspimentel I’ve been having similar issues with DataDog traces, MongoDB and SignalR. Thanks for logging this issue and leaving such detailed notes on the problems and how to address them 👍
Tyler,
SpanContext.None
was added in release 2.2.0 today so I will close this issue.Thanks again for your feedback!