lib/fluent/plugin/datadog_metrics_sender.rb in fluent-plugin-jfrog-send-metrics-0.1.6 vs lib/fluent/plugin/datadog_metrics_sender.rb in fluent-plugin-jfrog-send-metrics-0.1.7
- old
+ new
@@ -22,12 +22,12 @@
return record
end
return record
end
- def send_metrics(ddtags, record, http_proxy)
- puts "Additional tags to be added to metrics are", ddtags
+ def send_metrics(ddtags, record, http_proxy, verify_ssl)
+ puts "Additional tags to be added to metrics are:", ddtags
metrics_data = add_custom_data(ddtags, record)
puts "Sending received metrics data"
if http_proxy
RestClient.proxy = URI.parse(http_proxy)
@@ -46,10 +46,11 @@
begin
response = RestClient::Request.new(
method: :post,
url: @url,
payload: metrics_data.to_json,
- headers: {'DD-API-KEY': @apikey, content_type: :json }
+ headers: {'DD-API-KEY': @apikey, content_type: :json },
+ verify_ssl: verify_ssl
).execute do |response, request, result|
case response.code
when 202
puts 'Metrics were successfully sent to DataDog'
return response.body