Scrub unused data sent to Honeycomb to save space (#5512) [deploy]

This commit is contained in:
Molly Struve 2020-01-15 11:11:41 -05:00 committed by GitHub
parent bcd85452e9
commit 6726c62e94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,16 @@ else
send_data.action_controller
deliver.action_mailer
].freeze
# Scrub unused data to save space in Honeycomb
config.presend_hook do |fields|
if fields.key?("redis.command")
fields["redis.command"].slice!(0, 300)
elsif fields.key?("sql.active_record.binds")
fields.delete("sql.active_record.binds")
fields.delete("sql.active_record.datadog_span")
end
end
end
# here we create an additional Honeycomb client that can be used to send custom events