diff --git a/cmd/cart/product-fetcher.go b/cmd/cart/product-fetcher.go index a6ab32f..95e8184 100644 --- a/cmd/cart/product-fetcher.go +++ b/cmd/cart/product-fetcher.go @@ -30,7 +30,9 @@ func getBaseUrl(country string) string { func FetchItem(ctx context.Context, sku string, country string) (*index.DataItem, error) { baseUrl := getBaseUrl(country) req, err := http.NewRequest("GET", fmt.Sprintf("%s/api/by-sku/%s", baseUrl, sku), nil) - req = req.WithContext(ctx) + innerCtx, span := tracer.Start(ctx, fmt.Sprintf("fetching data for %s", sku)) + defer span.End() + req = req.WithContext(innerCtx) if err != nil { return nil, err }