diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index daad7f6f0fe..362c42ab59a 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -14,7 +14,7 @@ val DEPENDENCY_BOMS = listOf( "com.linecorp.armeria:armeria-bom:1.31.2", "com.squareup.okhttp3:okhttp-bom:4.12.0", "com.squareup.okio:okio-bom:3.9.1", // applies to transitive dependencies of okhttp - "io.grpc:grpc-bom:1.68.2", + "io.grpc:grpc-bom:1.69.0", "io.netty:netty-bom:4.1.115.Final", "io.zipkin.brave:brave-bom:6.0.3", "io.zipkin.reporter2:zipkin-reporter-bom:3.4.3", diff --git a/exporters/sender/grpc-managed-channel/src/main/java/io/opentelemetry/exporter/sender/grpc/managedchannel/internal/UpstreamGrpcSender.java b/exporters/sender/grpc-managed-channel/src/main/java/io/opentelemetry/exporter/sender/grpc/managedchannel/internal/UpstreamGrpcSender.java index 2c250399bb1..1f1ae5e4d28 100644 --- a/exporters/sender/grpc-managed-channel/src/main/java/io/opentelemetry/exporter/sender/grpc/managedchannel/internal/UpstreamGrpcSender.java +++ b/exporters/sender/grpc-managed-channel/src/main/java/io/opentelemetry/exporter/sender/grpc/managedchannel/internal/UpstreamGrpcSender.java @@ -19,9 +19,9 @@ import io.opentelemetry.exporter.internal.grpc.MarshalerServiceStub; import io.opentelemetry.exporter.internal.marshal.Marshaler; import io.opentelemetry.sdk.common.CompletableResultCode; +import java.time.Duration; import java.util.List; import java.util.Map; -import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import java.util.function.Supplier; import javax.annotation.Nullable; @@ -55,7 +55,7 @@ public UpstreamGrpcSender( public void send(T request, Consumer onResponse, Consumer onError) { MarshalerServiceStub stub = this.stub; if (timeoutNanos > 0) { - stub = stub.withDeadlineAfter(timeoutNanos, TimeUnit.NANOSECONDS); + stub = stub.withDeadlineAfter(Duration.ofNanos(timeoutNanos)); } Map> headers = headersSupplier.get(); if (headers != null) { diff --git a/sdk-extensions/jaeger-remote-sampler/src/main/java/io/opentelemetry/sdk/extension/trace/jaeger/sampler/UpstreamGrpcService.java b/sdk-extensions/jaeger-remote-sampler/src/main/java/io/opentelemetry/sdk/extension/trace/jaeger/sampler/UpstreamGrpcService.java index 32b19e4c0bc..49551df496f 100644 --- a/sdk-extensions/jaeger-remote-sampler/src/main/java/io/opentelemetry/sdk/extension/trace/jaeger/sampler/UpstreamGrpcService.java +++ b/sdk-extensions/jaeger-remote-sampler/src/main/java/io/opentelemetry/sdk/extension/trace/jaeger/sampler/UpstreamGrpcService.java @@ -11,7 +11,7 @@ import io.opentelemetry.exporter.internal.grpc.ManagedChannelUtil; import io.opentelemetry.exporter.internal.grpc.MarshalerServiceStub; import io.opentelemetry.sdk.common.CompletableResultCode; -import java.util.concurrent.TimeUnit; +import java.time.Duration; import java.util.logging.Level; import java.util.logging.Logger; @@ -48,7 +48,7 @@ public SamplingStrategyResponseUnMarshaler execute( SamplingStrategyParametersMarshaler, SamplingStrategyResponseUnMarshaler, ?> stub = this.stub; if (timeoutNanos > 0) { - stub = stub.withDeadlineAfter(timeoutNanos, TimeUnit.NANOSECONDS); + stub = stub.withDeadlineAfter(Duration.ofNanos(timeoutNanos)); } try {