fetcher span
Some checks failed
Build and Publish / Metadata (push) Successful in 18s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 55s
Build and Publish / BuildAndDeployArm64 (push) Failing after 5m55s

This commit is contained in:
2025-11-13 21:54:19 +01:00
parent e25ca3304e
commit cdfd263318

View File

@@ -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
}