MM-48651: Log error while queuing telemetry (#21821)

We didn't use to handle the error returned from the Enqueue
method. We fix that.

Additionally, we add a verbosity flag that can allow us to
look into verbose logs from the rudder client. This can
help us to debug issues regarding telemetry not being sent.

https://mattermost.atlassian.net/browse/MM-48651

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-12-08 21:25:00 +05:30
коммит произвёл GitHub
родитель 8c206c1fd4
Коммит 7606fd9725
4 изменённых файлов: 41 добавлений и 31 удалений

Просмотреть файл

@@ -1235,6 +1235,7 @@ type LogSettings struct {
FileLocation *string `access:"environment_logging,write_restrictable,cloud_restrictable"`
EnableWebhookDebugging *bool `access:"environment_logging,write_restrictable,cloud_restrictable"`
EnableDiagnostics *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` // telemetry: none
VerboseDiagnostics *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` // telemetry: none
EnableSentry *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` // telemetry: none
AdvancedLoggingConfig *string `access:"environment_logging,write_restrictable,cloud_restrictable"`
}
@@ -1278,6 +1279,10 @@ func (s *LogSettings) SetDefaults() {
s.EnableDiagnostics = NewBool(true)
}
if s.VerboseDiagnostics == nil {
s.VerboseDiagnostics = NewBool(false)
}
if s.EnableSentry == nil {
s.EnableSentry = NewBool(*s.EnableDiagnostics)
}