Skip to content

Commit

Permalink
chore(main): release 2.43.1-SNAPSHOT (#2711)
Browse files Browse the repository at this point in the history
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
  • Loading branch information
release-please[bot] authored and sydney-munro committed Oct 15, 2024
1 parent 0763c07 commit 2a6875a
Show file tree
Hide file tree
Showing 20 changed files with 518 additions and 42 deletions.
4 changes: 2 additions & 2 deletions gapic-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.43.0-beta</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<version>2.43.1-beta-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<name>gapic-google-cloud-storage-v2</name>
<description>GRPC library for gapic-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.43.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
Expand Down
16 changes: 8 additions & 8 deletions google-cloud-storage-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-bom</artifactId>
<version>2.43.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<packaging>pom</packaging>
<parent>
<groupId>com.google.cloud</groupId>
Expand Down Expand Up @@ -69,37 +69,37 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.43.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.43.0-beta</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<version>2.43.1-beta-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
<version>2.43.0-beta</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<version>2.43.1-beta-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
<version>2.43.0-beta</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<version>2.43.1-beta-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-control</artifactId>
<version>2.43.0</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage-control:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-control-v2</artifactId>
<version>2.43.0</version><!-- {x-version-update:grpc-google-cloud-storage-control-v2:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-control-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-control-v2</artifactId>
<version>2.43.0</version><!-- {x-version-update:proto-google-cloud-storage-control-v2:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-control-v2:current} -->
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-storage-control/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-control</artifactId>
<version>2.43.0</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<name>google-cloud-storage-control</name>
<description>GRPC library for google-cloud-storage-control</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.43.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>google-cloud-storage</artifactId>
<version>2.43.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<packaging>jar</packaging>
<name>Google Cloud Storage</name>
<url>https://github.com/googleapis/java-storage</url>
Expand All @@ -12,7 +12,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.43.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.43.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<properties>
<site.installationModule>google-cloud-storage</site.installationModule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
import io.grpc.MethodDescriptor;
import io.grpc.Status;
import io.grpc.protobuf.ProtoUtils;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -355,6 +356,11 @@ private Tuple<StorageSettings, Opts<UserProject>> resolveSettingsAndOpts() throw
return Tuple.of(builder.build(), defaultOpts);
}

@Override
public OpenTelemetrySdk getOpenTelemetrySdk() {
return null;
}

/** @since 2.14.0 This new api is in preview and is subject to breaking changes. */
@BetaApi
@Override
Expand Down Expand Up @@ -636,6 +642,11 @@ public GrpcStorageOptions.Builder setBlobWriteSessionConfig(
return this;
}

@Override
public StorageOptions.Builder setOpenTelemetrySdk(@NonNull OpenTelemetrySdk openTelemetrySdk) {
return null;
}

/** @since 2.14.0 This new api is in preview and is subject to breaking changes. */
@BetaApi
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import com.google.cloud.storage.spi.v1.StorageRpc;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
Expand All @@ -60,6 +61,8 @@ public class HttpStorageOptions extends StorageOptions {
private transient RetryDependenciesAdapter retryDepsAdapter;
private final BlobWriteSessionConfig blobWriteSessionConfig;

private OpenTelemetrySdk openTelemetrySdk;

private HttpStorageOptions(Builder builder, StorageDefaults serviceDefaults) {
super(builder, serviceDefaults);
this.retryAlgorithmManager =
Expand All @@ -68,6 +71,7 @@ private HttpStorageOptions(Builder builder, StorageDefaults serviceDefaults) {
builder.storageRetryStrategy, defaults().getStorageRetryStrategy()));
retryDepsAdapter = new RetryDependenciesAdapter();
blobWriteSessionConfig = builder.blobWriteSessionConfig;
openTelemetrySdk = builder.openTelemetrySdk;
}

@Override
Expand All @@ -85,6 +89,11 @@ StorageRpc getStorageRpcV1() {
return (StorageRpc) getRpc();
}

@Override
public OpenTelemetrySdk getOpenTelemetrySdk() {
return openTelemetrySdk;
}

@Override
public HttpStorageOptions.Builder toBuilder() {
return new HttpStorageOptions.Builder(this);
Expand Down Expand Up @@ -131,11 +140,16 @@ RetryingDependencies asRetryDependencies() {
return retryDepsAdapter;
}

public void setOpenTelemetrySdk(OpenTelemetrySdk openTelemetrySdk) {
this.openTelemetrySdk = openTelemetrySdk;
}

public static class Builder extends StorageOptions.Builder {

private StorageRetryStrategy storageRetryStrategy;
private BlobWriteSessionConfig blobWriteSessionConfig =
HttpStorageDefaults.INSTANCE.getDefaultStorageWriterConfig();
private OpenTelemetrySdk openTelemetrySdk;

Builder() {}

Expand All @@ -144,6 +158,7 @@ public static class Builder extends StorageOptions.Builder {
HttpStorageOptions hso = (HttpStorageOptions) options;
this.storageRetryStrategy = hso.retryAlgorithmManager.retryStrategy;
this.blobWriteSessionConfig = hso.blobWriteSessionConfig;
this.openTelemetrySdk = hso.getOpenTelemetrySdk();
}

@Override
Expand Down Expand Up @@ -269,6 +284,17 @@ public HttpStorageOptions build() {
}
return options;
}

/**
* Enable OpenTelemetry Tracing and provide an instance for the client to use.
*
* @param openTelemetrySdk
*/
public HttpStorageOptions.Builder setOpenTelemetrySdk(OpenTelemetrySdk openTelemetrySdk) {
requireNonNull(openTelemetrySdk, "openTelemetry must be non null");
this.openTelemetrySdk = openTelemetrySdk;
return this;
}
}

public static final class HttpStorageDefaults extends StorageDefaults {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.google.cloud.storage.Storage.BlobWriteOption;
import com.google.cloud.storage.TransportCompatibility.Transport;
import com.google.cloud.storage.spi.StorageRpcFactory;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
Expand Down Expand Up @@ -110,6 +111,9 @@ public abstract static class Builder
public abstract StorageOptions.Builder setBlobWriteSessionConfig(
@NonNull BlobWriteSessionConfig blobWriteSessionConfig);

public abstract StorageOptions.Builder setOpenTelemetrySdk(
@NonNull OpenTelemetrySdk openTelemetrySdk);

@Override
public abstract StorageOptions build();
}
Expand Down Expand Up @@ -144,6 +148,8 @@ public static String version() {
return VERSION;
}

public abstract OpenTelemetrySdk getOpenTelemetrySdk();

@SuppressWarnings("unchecked")
@Override
public abstract StorageOptions.Builder toBuilder();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package com.google.cloud.storage.otel;

import javax.annotation.Nonnull;

class NoOpOpenTelemetryInstance implements OpenTelemetryTraceUtil {

@Override
public Span startSpan(String spanName) {
return null;
}

@Override
public Span startSpan(String spanName, Context parent) {
return null;
}

@Nonnull
@Override
public Span currentSpan() {
return null;
}

@Nonnull
@Override
public Context currentContext() {
return null;
}
}
Loading

0 comments on commit 2a6875a

Please sign in to comment.