You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Figuring out the manner in which traces are supposed to be recorded has been a bit difficult because it's changed so much, but the last thing I've tried is the (new?) trace method. But the problem is that no Span has the root ID (indeed, nothing but tests invoke the SpanId.root() method).
Consequently, the span that should be marked as root is instead marked as invalid and Grafana shows:
And there doesn't seem to be a "way in" such that I can manually override or control the ID of the span.
Steps to reproduce
I'm just doing:
final tracer = globalTracerProvider.getTracer('my_app');
returntrace(
'span_name',
() async { /* code here */ },
tracer: tracer,
spanKind:SpanKind.client,
);
I also tried specifying newRoot: true, but it made no difference (nor did I expect it to based on the current code).
What did you expect to see?
I don't know if my expectations are off, but I expected the library to just make sure the first span for the context is marked as the root span. I don't think any kind of manual intervention should be required.
What did you see instead?
No span is marked as root. What should be the root span instead has the invalid ID.
PS. I should have mentioned I also tried the approach espoused by the README (manually creating spans via tracer.startSpan and ending them), but had the same issue.
Describe the bug
Figuring out the manner in which traces are supposed to be recorded has been a bit difficult because it's changed so much, but the last thing I've tried is the (new?)
trace
method. But the problem is that noSpan
has the root ID (indeed, nothing but tests invoke theSpanId.root()
method).Consequently, the span that should be marked as root is instead marked as invalid and Grafana shows:
And there doesn't seem to be a "way in" such that I can manually override or control the ID of the span.
Steps to reproduce
I'm just doing:
I also tried specifying
newRoot: true
, but it made no difference (nor did I expect it to based on the current code).What did you expect to see?
I don't know if my expectations are off, but I expected the library to just make sure the first span for the context is marked as the root span. I don't think any kind of manual intervention should be required.
What did you see instead?
No span is marked as root. What should be the root span instead has the invalid ID.
What version and what artifacts are you using?
My bootstrap logic looks like:
Environment
Dart Version:
3.7.0
OS: Windows 10
The text was updated successfully, but these errors were encountered: