Explicitly configure libhoney null client when no api key detected (#14154)
This configures the fallback behavior we're relying on in self-hosted forems, and disables a warning that the fallback is happening.
This commit is contained in:
parent
d625ef9f70
commit
e99e803867
1 changed files with 6 additions and 0 deletions
|
|
@ -20,6 +20,12 @@ else
|
|||
|
||||
Honeycomb.configure do |config|
|
||||
config.write_key = honeycomb_api_key.presence
|
||||
|
||||
# libhoney client will automatically fall back to using a null transmission
|
||||
# when no write key is provided, but it will log a warning (visible in a few places)
|
||||
# explicitly override the client to disable the warning
|
||||
config.client = Libhoney::NullClient.new unless config.write_key
|
||||
|
||||
if ENV["HONEYCOMB_DISABLE_AUTOCONFIGURE"]
|
||||
config.dataset = "background-work"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue