[discuss][EBT] Defer sendTo
setup
#129014
Labels
discuss
Feature:Telemetry
impact:high
Addressing this issue will have a high level of impact on the quality/strength of our product.
loe:medium
Medium Level of Effort
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
In #128407 (comment) we identified an important limitation in the Kibana architecture that may affect the EBT client:
The client requires the option
sendTo: 'production' | 'staging'
. However, this information is available based on thetelemetry.sendUsageTo
config. The client is instantiated incore
, meaning that at the point of registration we can't rely on that setting.Here are the options we can consider:
Read
telemetry.sendUsageTo
fromcore
core
can actually readtelemetry.sendUsageTo
from the config. It's the most reliable way because the value is set from the beginning and we don't risk having an initial value different to the final one, meaning some events may be shipped to a different environment depending on when they were generated.However, it creates an implicit dependency from
core
to thetelemetry
plugin, breaking Kibana's architectural principles and the separation of domains we stand for.Add
sendTo
config to theregisterShipper
APIOn top of providing it to the client's constructor, we can overwrite this value when registering the shipper. The problem is similar to the previous option: while
core
doesn't depend ontelemetry
, other plugins registering their own shippers may depend ontelemetry
to read this value.It also adds another problem: different shippers may send to different environments.
Add a new
sendTo
APIAdding a new dedicated
sendTo
API to set this parameter would allow us to set the environment once we resolve the config. However, it creates more complexity for the client with another hold-until-resolved mechanism similar to theoptIn
API.Also adding the similar risks: if never set, it holds the logic forever. Although these risks could be solved by not allowing to disable the
telemetry
plugin (deprecatetelemetry.enabled: false
).The text was updated successfully, but these errors were encountered: