question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to create a root scope with v2 API

See original GitHub issue

I’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:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
fdmarccommented, May 29, 2023

@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 👍

1reaction
lucaspimentelcommented, Feb 2, 2022

Tyler, SpanContext.None was added in release 2.2.0 today so I will close this issue.

Thanks again for your feedback!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found