Skip to content

Commit

Permalink
Use TRACEPARENT to propagate the context to go test
Browse files Browse the repository at this point in the history
To be more aligned with other ecosystem tools. We will switch to the environmental variable designated by OpenTelemetry.

Related to #2.
  • Loading branch information
rakyll committed Sep 22, 2021
1 parent 082a024 commit 2249361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func trace(args []string) error {
cmd := exec.Command("go", goTestArgs...)
cmd.Env = append(
os.Environ(),
fmt.Sprintf("GO_TRACE_TEST_TRACEPARENT=%q", globalSpan.SpanContext().TraceID()),
fmt.Sprintf("TRACEPARENT=%q", globalSpan.SpanContext().TraceID()),
)
r, err := cmd.StdoutPipe()
if err != nil {
Expand Down

0 comments on commit 2249361

Please sign in to comment.