diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-09 06:07:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-09 06:07:18 +0300 |
commit | 78f70f8ae3786a57d57eae1e95ce728acc783463 (patch) | |
tree | 10d816f42c472e3af4ae2d13ba1be217e2f7816d /app/services/service_ping | |
parent | a56c4bff3e2c82422bf2cc250e3828f71feb7876 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/service_ping')
-rw-r--r-- | app/services/service_ping/submit_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/service_ping/submit_service.rb b/app/services/service_ping/submit_service.rb index da2a51562f8..6d39174b6c7 100644 --- a/app/services/service_ping/submit_service.rb +++ b/app/services/service_ping/submit_service.rb @@ -42,20 +42,20 @@ module ServicePing { metadata: { uuid: service_ping_payload[:uuid], - metrics: metrics_collection_time(service_ping_payload) + metrics: metrics_collection_metadata(service_ping_payload) } } end - def metrics_collection_time(payload, parents = []) + def metrics_collection_metadata(payload, parents = []) return [] unless payload.is_a?(Hash) payload.flat_map do |key, metric_value| key_path = parents.dup.append(key) if metric_value.respond_to?(:duration) - { name: key_path.join('.'), time_elapsed: metric_value.duration } + { name: key_path.join('.'), time_elapsed: metric_value.duration, error: metric_value.error }.compact else - metrics_collection_time(metric_value, key_path) + metrics_collection_metadata(metric_value, key_path) end end end |