Provide a TelemetryManagerDelegate protocol with methods that return a default user identifier string and a default payload.
Every time TelemetryManager.send is called, the method queries wether a delegate is present and what it has to say about default user and payload, mixing in first the built-in payload, then the delegates payload, then the provided payload at method call.
This way, developers do not have to provide these data over and over again, leading to repetition and errors.
Provide a
TelemetryManagerDelegate
protocol with methods that return a default user identifier string and a default payload.Every time
TelemetryManager.send
is called, the method queries wether a delegate is present and what it has to say about default user and payload, mixing in first the built-in payload, then the delegates payload, then the provided payload at method call.This way, developers do not have to provide these data over and over again, leading to repetition and errors.