Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [cloudprofiler] add client side retry config for export service #10060

Merged
merged 4 commits into from Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions java-profiler/README.md
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.23.0</version>
<version>26.27.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-profiler.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-profiler/2.24.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-profiler/2.30.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Expand Up @@ -238,10 +238,10 @@ public static class Builder extends StubSettings.Builder<ProfilerServiceStubSett
static {
ImmutableMap.Builder<String, ImmutableSet<StatusCode.Code>> definitions =
ImmutableMap.builder();
definitions.put(
"no_retry_1_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put(
"no_retry_2_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put(
"no_retry_3_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}

Expand All @@ -257,15 +257,15 @@ public static class Builder extends StubSettings.Builder<ProfilerServiceStubSett
.setMaxRpcTimeout(Duration.ofMillis(3610000L))
.setTotalTimeout(Duration.ofMillis(3610000L))
.build();
definitions.put("no_retry_1_params", settings);
definitions.put("no_retry_2_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRpcTimeout(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(30000L))
.setTotalTimeout(Duration.ofMillis(30000L))
.build();
definitions.put("no_retry_2_params", settings);
definitions.put("no_retry_3_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}

Expand Down Expand Up @@ -327,18 +327,18 @@ private static Builder createHttpJsonDefault() {
private static Builder initDefaults(Builder builder) {
builder
.createProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));

builder
.createOfflineProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params"));

builder
.updateProfileSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params"));

return builder;
}
Expand Down
Expand Up @@ -121,13 +121,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "com\322A\212\001https://www.googleapis.com/auth/c"
+ "loud-platform,https://www.googleapis.com"
+ "/auth/monitoring,https://www.googleapis."
+ "com/auth/monitoring.writeB\332\001\n$com.google"
+ "com/auth/monitoring.writeB\324\001\n$com.google"
+ ".devtools.cloudprofiler.v2B\rProfilerProt"
+ "oP\001ZMgoogle.golang.org/genproto/googleap"
+ "is/devtools/cloudprofiler/v2;cloudprofil"
+ "er\252\002\030Google.Cloud.Profiler.V2\312\002\030Google\\C"
+ "loud\\Profiler\\V2\352\002\033Google::Cloud::Profil"
+ "er::V2b\006proto3"
+ "oP\001ZGcloud.google.com/go/cloudprofiler/a"
+ "piv2/cloudprofilerpb;cloudprofilerpb\252\002\030G"
+ "oogle.Cloud.Profiler.V2\312\002\030Google\\Cloud\\P"
+ "rofiler\\V2\352\002\033Google::Cloud::Profiler::V2"
+ "b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand Down
Expand Up @@ -24,7 +24,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.proto";

option csharp_namespace = "Google.Cloud.Profiler.V2";
option go_package = "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2;cloudprofiler";
option go_package = "cloud.google.com/go/cloudprofiler/apiv2/cloudprofilerpb;cloudprofilerpb";
option java_multiple_files = true;
option java_outer_classname = "ProfilerProto";
option java_package = "com.google.devtools.cloudprofiler.v2";
Expand Down