#missing telemetry

1 messages · Page 1 of 1 (latest)

queen magnet
#

I'm not sure actually why nothing shows up underneath it. Wondering if somehow the parallel util doesn't work the same way when used in core in the engine vs. from a user module? That's the only thing that immediately comes to mind as a possibility

#

missing telemetry

harsh osprey
#

I'll try isolating that, see what happens

queen magnet
# harsh osprey I'll try isolating that, see what happens

I think I fixed it locally (got nerd sniped):

diff --git a/util/parallel/parallel.go b/util/parallel/parallel.go
index 63a57df41..56fd5efa0 100644
--- a/util/parallel/parallel.go
+++ b/util/parallel/parallel.go
@@ -4,7 +4,6 @@ import (
        "context"
        "slices"
 
-       "go.opentelemetry.io/otel"
        "go.opentelemetry.io/otel/attribute"
        "go.opentelemetry.io/otel/codes"
        "go.opentelemetry.io/otel/trace"
@@ -47,7 +46,7 @@ func startSpan(ctx context.Context, name string) (context.Context, trace.Span) {
        attr := []attribute.KeyValue{
                attribute.Bool("dagger.io/ui.reveal", true),
        }
-       return otel.
+       return trace.SpanFromContext(ctx).TracerProvider().
                Tracer("dagger.io/util/parallel").
                Start(ctx, name, trace.WithAttributes(attr...))
 }

https://dagger.cloud/dagger/traces/0065e183af36c9b9e458d712b9c1ff4f

#

the question is if using SpanFromContext will also work in user modules where parallel is being used today, I'd hope so but not entirely sure

harsh osprey
#

@queen magnet the fix doesn't seem to work for me..

queen magnet
#

only with that fix in place, before I was getting the same thing as you

harsh osprey
#

@queen magnet what's very weird is that, even before applying that fix (but also after, no visible change for me):

  • Nothing gets printed during the check
  • I get a huge telemetry dump after running the check, on the TUI. Too large to scroll all the way back up, but it looks like, I assume, what should have been streaming, only buffered
  • When I look at the same trace in dagger cloud: none of that "dump" is visible 🤔