lib/logstash/outputs/datadog.rb in logstash-output-datadog-2.0.4 vs lib/logstash/outputs/datadog.rb in logstash-output-datadog-3.0.0
- old
+ new
@@ -51,13 +51,10 @@
@logger.debug("Client", :client => @client.inspect)
end # def register
public
def receive(event)
-
-
-
dd_event = Hash.new
dd_event['title'] = event.sprintf(@title)
dd_event['text'] = event.sprintf(@text)
dd_event['source_type_name'] = @source_type_name
dd_event['alert_type'] = @alert_type if @alert_type
@@ -70,10 +67,10 @@
end
if @dd_tags
tagz = @dd_tags.collect {|x| event.sprintf(x) }
else
- tagz = event["tags"]
+ tagz = event.get("tags")
end
dd_event['tags'] = tagz if tagz
@logger.debug("DataDog event", :dd_event => dd_event)