Repository navigation
fix(go): continue the engine's trace in the dispatcher - #75
Merged
Merged
Conversation
The dispatcher called module functions with an empty context, so their trace ID was zero and the spans they started were never exported. It now initializes telemetry from the engine's TRACEPARENT and OTEL_* variables, as the Go runtime does. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
force-pushed
the
fix-dispatcher-telemetry
branch
from
October 16, 2026 20:02
9b626e5 to
ada037f
Compare
The collection build loads package main with the dispatcher, which imports otel-go, before the final tidy restored that requirement. With unified bindings, which do not import otel-go, the load failed for a +collection module. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 18, 2026
dagger/go-sdk#75 continues the engine's trace in the dispatcher. Git workspaces resolve go-sdk main live instead of the lock pin, so Cloud already generates with it. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 20, 2026
dagger/go-sdk#75 continues the engine's trace in the dispatcher. Git workspaces resolve go-sdk main live instead of the lock pin, so Cloud already generates with it. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 21, 2026
dagger/go-sdk#75 continues the engine's trace in the dispatcher. Git workspaces resolve go-sdk main live instead of the lock pin, so Cloud already generates with it. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 22, 2026
dagger/go-sdk#75 continues the engine's trace in the dispatcher. Git workspaces resolve go-sdk main live instead of the lock pin, so Cloud already generates with it. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 22, 2026
dagger/go-sdk#75 continues the engine's trace in the dispatcher. Git workspaces resolve go-sdk main live instead of the lock pin, so Cloud already generates with it. Signed-off-by: Yves Brissaud <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
With a Dang entrypoint, the dispatcher called module functions with
context.Background()and never set up telemetry. In author code thetrace ID was all zeros, and spans from
Tracer()were never exported.The dispatcher now calls
telemetry.InitEmbeddedlike the Go runtime'smain, so it reads the engine's
TRACEPARENTandOTEL_*. It closestelemetry before exit, on errors too. Generation pins otel-go again before
the final tidy, so the dispatcher's import does not resolve at latest.
How verified
was missing. Now the ctx carries the engine's trace and the span parents
the function's calls, as on the Go runtime.
TRACEPARENTset, the dispatched ctx has its trace ID.Not covered
Generated modules require otel-go again, as Go-runtime modules do; go.mod
and the dispatcher build grow accordingly.
Land together with or after #74 (it seeds the genproto requirements this change makes every module need).
Walkthrough: https://gistpreview.github.io/?a7487916f6cd169a072034196d0db7ae