From 0c8057568bc3c29021a92284d721f791cf352656 Mon Sep 17 00:00:00 2001 From: Roel Bondoc Date: Thu, 14 Nov 2024 10:32:30 -0500 Subject: [PATCH] feat: only allow for insights to be enabled when public This means that the gem must be able to report data as well requiring the environment to not be a `development_environment`. This should prevent any unexpected Insights related code to run in dev or test environments. --- lib/honeybadger/config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/honeybadger/config.rb b/lib/honeybadger/config.rb index 460df30b..e6e4f618 100644 --- a/lib/honeybadger/config.rb +++ b/lib/honeybadger/config.rb @@ -289,7 +289,7 @@ def load_plugin?(name) end def insights_enabled? - !!self[:'insights.enabled'] + public? && !!self[:'insights.enabled'] end def cluster_collection?(name)