[deploy] dont configure Honeycomb if its disabled (#6618)
This commit is contained in:
parent
1c195b02de
commit
bbff0f757e
2 changed files with 24 additions and 19 deletions
|
|
@ -8,25 +8,29 @@ else
|
||||||
# Honeycomb automatic Rails integration
|
# Honeycomb automatic Rails integration
|
||||||
Honeycomb.configure do |config|
|
Honeycomb.configure do |config|
|
||||||
config.write_key = honeycomb_api_key
|
config.write_key = honeycomb_api_key
|
||||||
config.dataset = "rails"
|
if ENV["HONEYCOMB_DISABLE_AUTOCONFIGURE"]
|
||||||
config.notification_events = %w[
|
config.dataset = "background-work"
|
||||||
sql.active_record
|
else
|
||||||
render_template.action_view
|
config.dataset = "rails"
|
||||||
render_partial.action_view
|
config.notification_events = %w[
|
||||||
render_collection.action_view
|
sql.active_record
|
||||||
process_action.action_controller
|
render_template.action_view
|
||||||
send_file.action_controller
|
render_partial.action_view
|
||||||
send_data.action_controller
|
render_collection.action_view
|
||||||
deliver.action_mailer
|
process_action.action_controller
|
||||||
].freeze
|
send_file.action_controller
|
||||||
|
send_data.action_controller
|
||||||
|
deliver.action_mailer
|
||||||
|
].freeze
|
||||||
|
|
||||||
# Scrub unused data to save space in Honeycomb
|
# Scrub unused data to save space in Honeycomb
|
||||||
config.presend_hook do |fields|
|
config.presend_hook do |fields|
|
||||||
if fields.key?("redis.command")
|
if fields.key?("redis.command")
|
||||||
fields["redis.command"].slice!(0, 300)
|
fields["redis.command"].slice!(0, 300)
|
||||||
elsif fields.key?("sql.active_record.binds")
|
elsif fields.key?("sql.active_record.binds")
|
||||||
fields.delete("sql.active_record.binds")
|
fields.delete("sql.active_record.binds")
|
||||||
fields.delete("sql.active_record.datadog_span")
|
fields.delete("sql.active_record.datadog_span")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@ if [ "$DYNOTYPE" == "scheduler" ] || [ "$DYNOTYPE" == "run" ]; then
|
||||||
# Disable Automatic Beeline integrations to prevent unnecessary
|
# Disable Automatic Beeline integrations to prevent unnecessary
|
||||||
# data from being tracked in Honeycomb
|
# data from being tracked in Honeycomb
|
||||||
# more info here: https://docs.honeycomb.io/getting-data-in/ruby/beeline/#using-env-variables-to-control-framework-integrations
|
# more info here: https://docs.honeycomb.io/getting-data-in/ruby/beeline/#using-env-variables-to-control-framework-integrations
|
||||||
HONEYCOMB_DISABLE_AUTOCONFIGURE="true"
|
export HONEYCOMB_DISABLE_AUTOCONFIGURE="true"
|
||||||
|
export HONEYCOMB_INTEGRATIONS=rails,rake,active_support
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue