update
Some checks failed
Build and Publish / Metadata (push) Successful in 16s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 1m0s
Build and Publish / BuildAndDeployArm64 (push) Has been cancelled

This commit is contained in:
2025-11-13 21:52:29 +01:00
parent af5d4cd325
commit e25ca3304e
7 changed files with 110 additions and 37 deletions

View File

@@ -356,7 +356,7 @@ func (s *PoolServer) CreateOrUpdateCheckout(ctx context.Context, host string, id
}
if s.inventoryService != nil {
inventoryRequests := getInventoryRequests(grain.Items)
failingRequest, err := s.inventoryService.ReservationCheck(inventoryRequests...)
failingRequest, err := s.inventoryService.ReservationCheck(ctx, inventoryRequests...)
if err != nil {
logger.WarnContext(ctx, "inventory check failed", string(failingRequest.SKU), string(failingRequest.LocationID))
return nil, err
@@ -632,6 +632,7 @@ func (s *PoolServer) Serve(mux *http.ServeMux) {
attr := attribute.String("http.route", pattern)
mux.HandleFunc(pattern, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
span := trace.SpanFromContext(r.Context())
span.SetName(pattern)
span.SetAttributes(attr)
labeler, _ := otelhttp.LabelerFromContext(r.Context())