Skip to content

Commit

Permalink
fix: fix metric client settings (#1509)
Browse files Browse the repository at this point in the history
* fix: fix metric client settings

* fix format

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
mutianf and gcf-owl-bot[bot] committed Nov 9, 2022
1 parent 340db73 commit 38ac115
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-bigtable'
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-bigtable:2.15.0'
implementation 'com.google.cloud:google-cloud-bigtable:2.15.1'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.15.0"
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.15.1"
```

## Authentication
Expand Down
Expand Up @@ -85,9 +85,8 @@ static MetricServiceClient createMetricServiceClient(Credentials credentials, Du
.setTransportChannelProvider(InstantiatingGrpcChannelProvider.newBuilder().build());
settingsBuilder.setCredentialsProvider(FixedCredentialsProvider.create(credentials));

org.threeten.bp.Duration stackdriverDuration =
org.threeten.bp.Duration.ofMillis(deadline.toMillis());
settingsBuilder.createTimeSeriesSettings().setSimpleTimeoutNoRetries(stackdriverDuration);
org.threeten.bp.Duration timeout = org.threeten.bp.Duration.ofMillis(deadline.toMillis());
settingsBuilder.createServiceTimeSeriesSettings().setSimpleTimeoutNoRetries(timeout);
return MetricServiceClient.create(settingsBuilder.build());
}
}

0 comments on commit 38ac115

Please sign in to comment.