mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 03:57:51 +02:00
Switch MetricReporter to App default credential (#1837)
This commit is contained in:
parent
ac8ead5b83
commit
25bdf5bee4
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ import com.google.monitoring.metrics.MetricWriter;
|
|||
import com.google.monitoring.metrics.stackdriver.StackdriverWriter;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import google.registry.config.CredentialModule.JsonCredential;
|
||||
import google.registry.config.CredentialModule.ApplicationDefaultCredential;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.util.GoogleCredentialsBundle;
|
||||
import org.joda.time.Duration;
|
||||
|
@ -39,7 +39,7 @@ public final class StackdriverModule {
|
|||
|
||||
@Provides
|
||||
static Monitoring provideMonitoring(
|
||||
@JsonCredential GoogleCredentialsBundle credentialsBundle,
|
||||
@ApplicationDefaultCredential GoogleCredentialsBundle credentialsBundle,
|
||||
@Config("projectId") String projectId) {
|
||||
return new Monitoring.Builder(
|
||||
credentialsBundle.getHttpTransport(),
|
||||
|
|
Loading…
Add table
Reference in a new issue