Rudder key and dataplane in Config (#15026)
* To allow for ease of testing telemetry changes, we should make it so that the rudder key and dataplane URL can be customized through the config or environment. * Instead of using a real config element that would be exposed to end users, we'll just use 'secret' environment variables to inject Rudder config data. Co-authored-by: Alex Dovenmuehle <alex.dovenmuehle@mattermost.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3fc9ed9871
Коммит
4791aca112
@@ -1299,7 +1299,7 @@ func (s *Server) stopSearchEngine() {
|
||||
}
|
||||
|
||||
// initDiagnostics initialises the Rudder client for the diagnostics system.
|
||||
func (s *Server) initDiagnostics(endpoint string) {
|
||||
func (s *Server) initDiagnostics(endpoint string, rudderKey string) {
|
||||
if s.rudderClient == nil {
|
||||
config := rudder.Config{}
|
||||
config.Logger = rudder.StdLogger(s.Log.StdLog(mlog.String("source", "rudder")))
|
||||
@@ -1309,7 +1309,7 @@ func (s *Server) initDiagnostics(endpoint string) {
|
||||
config.Verbose = true
|
||||
config.BatchSize = 1
|
||||
}
|
||||
client, err := rudder.NewWithConfig(RUDDER_KEY, endpoint, config)
|
||||
client, err := rudder.NewWithConfig(rudderKey, endpoint, config)
|
||||
if err != nil {
|
||||
mlog.Error("Failed to create Rudder instance", mlog.Err(err))
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user