We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff85daf commit cfcb81aCopy full SHA for cfcb81a
spec/datadog/opentelemetry/metrics_spec.rb
@@ -58,12 +58,7 @@ def get_testagent_metrics
58
59
parsed = JSON.parse(response.body, symbolize_names: false)
60
next parsed if parsed.is_a?(Array) && !parsed.empty?
61
-
62
- if parsed.is_a?(Hash)
63
- metrics_array = parsed['metrics']
64
- next metrics_array if metrics_array.is_a?(Array) && !metrics_array.empty?
65
- next [parsed]
66
- end
+ next parsed['metrics'] if parsed.is_a?(Hash) && parsed['metrics'].is_a?(Array) && !parsed['metrics'].empty?
67
end
68
69
0 commit comments