Skip to content

Commit

Permalink
chore: add span_id to the trace url
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Sep 14, 2023
1 parent c4f532e commit 45f8d8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uptrace/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ func (c *client) ForceFlush(ctx context.Context) (lastErr error) {

// TraceURL returns the trace URL for the span.
func (c *client) TraceURL(span trace.Span) string {
return fmt.Sprintf("%s/traces/%s", c.dsn.AppAddr(), span.SpanContext().TraceID())
sctx := span.SpanContext()
return fmt.Sprintf("%s/traces/%s?span_id=%s",
c.dsn.AppAddr(), sctx.TraceID(), sctx.SpanID().String())
}

// ReportError reports an error as a span event creating a dummy span if necessary.
Expand Down

0 comments on commit 45f8d8c

Please sign in to comment.