diff --git a/exporter/alibabacloudlogserviceexporter/uploader.go b/exporter/alibabacloudlogserviceexporter/uploader.go index 08712e565939..1839dcdd70e8 100644 --- a/exporter/alibabacloudlogserviceexporter/uploader.go +++ b/exporter/alibabacloudlogserviceexporter/uploader.go @@ -53,9 +53,9 @@ func newLogServiceClient(config *Config, logger *zap.Logger) (logServiceClient, producerConfig.AccessKeySecret = string(config.AccessKeySecret) if config.ECSRamRole != "" || config.TokenFilePath != "" { tokenUpdateFunc, _ := slsutil.NewTokenUpdateFunc(config.ECSRamRole, config.TokenFilePath) - // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/26987 - // nolint - producerConfig.UpdateStsToken = tokenUpdateFunc + provider := sls.NewUpdateFuncProviderAdapter(tokenUpdateFunc) + producerConfig.CredentialsProvider = provider + producerConfig.StsTokenShutDown = make(chan struct{}) }