fix: pass context into secrets logs (#95944)

This commit is contained in:
Mariell Hoversholm
2024-11-06 12:52:29 +01:00
committed by GitHub
parent 3c1a5ab439
commit f15f6022de
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -331,7 +331,7 @@ func (s *SecretsService) Decrypt(ctx context.Context, payload []byte) ([]byte, e
}).Inc()
if err != nil {
s.log.Error("Failed to decrypt secret", "error", err)
s.log.FromContext(ctx).Error("Failed to decrypt secret", "error", err)
}
}()
@@ -371,7 +371,7 @@ func (s *SecretsService) Decrypt(ctx context.Context, payload []byte) ([]byte, e
dataKey, err = s.dataKeyById(ctx, string(keyId))
if err != nil {
s.log.Error("Failed to lookup data key by id", "id", string(keyId), "error", err)
s.log.FromContext(ctx).Error("Failed to lookup data key by id", "id", string(keyId), "error", err)
return nil, err
}
}