Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions core/services/workflows/v2/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,16 @@ func (s *secretsFetcher) GetSecrets(ctx context.Context, request *sdkpb.GetSecre
defer free()
return s.getSecretsForBatch(ctx, request)
}()

getSecretsDuration := time.Since(start).Milliseconds()
if err != nil {
// Log errors when secrets fetching fails, for troubleshooting and debugging
s.lggr.Warnw("Secrets fetching failed for request", "request", request, "error", err, "requestLatency", getSecretsDuration)
}
s.metrics.With(
"workflowOwner", s.workflowOwner,
"workflowName", s.workflowName,
"success", strconv.FormatBool(err == nil),
).RecordGetSecretsDuration(ctx, time.Since(start).Milliseconds())
).RecordGetSecretsDuration(ctx, getSecretsDuration)

return resp, err
}
Expand Down
Loading