Closed redbeam closed 6 months ago
its methods will do nothing
logging?
Yes, the methods can log their "inactivity". But I'm not sure if every call needs to do that. Maybe only the first would be enough.
It depends on the state:
We might want to understand the NoopClient
received the call and continues to execute the regular method. Just to be sure, we have full traceability when an error occurs. Logs are rotated anyway.
Discussed in #4023
Currently, any error in the initialization of segment client prevents the program to run. Since it only deals with telemetry collection, it should not block other, more important parts of the program.
I propose implementing a "mock" segment client (NoopClient) that will be returned if the initialization of the real segment client fails. This way, the execution of the command is not interrupted by any error in telemetry. If this happens, the mock client will return a warning stating that telemetry will not be available in current session and its methods will do nothing.