Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
Comparing source compatibility of opentelemetry-exporter-otlp-1.65.0-SNAPSHOT.jar against opentelemetry-exporter-otlp-1.64.0.jar
No changes.
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.exporter.otlp.http.logs.OtlpHttpLogRecordExporterBuilder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.exporter.otlp.http.logs.OtlpHttpLogRecordExporterBuilder setEnabledProtocols(java.util.List<java.lang.String>)
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.exporter.otlp.http.metrics.OtlpHttpMetricExporterBuilder setEnabledProtocols(java.util.List<java.lang.String>)
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporterBuilder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporterBuilder setEnabledProtocols(java.util.List<java.lang.String>)
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.exporter.otlp.logs.OtlpGrpcLogRecordExporterBuilder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.exporter.otlp.logs.OtlpGrpcLogRecordExporterBuilder setEnabledProtocols(java.util.List<java.lang.String>)
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.exporter.otlp.metrics.OtlpGrpcMetricExporterBuilder setEnabledProtocols(java.util.List<java.lang.String>)
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporterBuilder (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporterBuilder setEnabledProtocols(java.util.List<java.lang.String>)
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
Comparing source compatibility of opentelemetry-sdk-common-1.65.0-SNAPSHOT.jar against opentelemetry-sdk-common-1.64.0.jar
No changes.
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.sdk.common.export.GrpcSenderConfig (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW METHOD: PUBLIC(+) java.util.List<java.lang.String> getEnabledProtocols()
+++ NEW ANNOTATION: javax.annotation.Nullable
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.sdk.common.export.HttpSenderConfig (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW METHOD: PUBLIC(+) java.util.List<java.lang.String> getEnabledProtocols()
+++ NEW ANNOTATION: javax.annotation.Nullable
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ public void setUp() {
null,
null,
null,
Long.MAX_VALUE),
Long.MAX_VALUE,
null),
InternalTelemetryVersion.LATEST,
ComponentId.generateLazy(StandardComponentId.ExporterType.OTLP_GRPC_SPAN_EXPORTER),
MeterProvider::noop,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.opentelemetry.sdk.common.export.RetryPolicy;
import io.opentelemetry.sdk.common.internal.StandardComponentId;
import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -274,6 +275,22 @@ public OtlpHttpLogRecordExporterBuilder setExecutorService(ExecutorService execu
return this;
}

/**
* Sets the TLS protocol versions to enable when connecting to an HTTPS endpoint. Pass {@code
* null} to defer to the sender implementation's default.
*
* <p>Protocol names follow the JSSE convention: {@code "TLSv1.2"}, {@code "TLSv1.3"}, etc.
*
* <p>Note: enabling legacy protocol versions (TLSv1, TLSv1.1) also requires removing them from
* the JVM's {@code jdk.tls.disabledAlgorithms} security property.
*/
public OtlpHttpLogRecordExporterBuilder setEnabledProtocols(List<String> enabledProtocols) {
requireNonNull(enabledProtocols, "enabledProtocols");
checkArgument(!enabledProtocols.isEmpty(), "enabledProtocols must not be empty");
delegate.setEnabledProtocols(enabledProtocols);
return this;
}

/**
* Constructs a new instance of the exporter based on the builder's values.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import io.opentelemetry.sdk.metrics.export.MetricExporter;
import java.time.Duration;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -333,6 +334,22 @@ public OtlpHttpMetricExporterBuilder setExecutorService(ExecutorService executor
return this;
}

/**
* Sets the TLS protocol versions to enable when connecting to an HTTPS endpoint. Pass {@code
* null} to defer to the sender implementation's default.
*
* <p>Protocol names follow the JSSE convention: {@code "TLSv1.2"}, {@code "TLSv1.3"}, etc.
*
* <p>Note: enabling legacy protocol versions (TLSv1, TLSv1.1) also requires removing them from
* the JVM's {@code jdk.tls.disabledAlgorithms} security property.
*/
public OtlpHttpMetricExporterBuilder setEnabledProtocols(List<String> enabledProtocols) {
requireNonNull(enabledProtocols, "enabledProtocols");
checkArgument(!enabledProtocols.isEmpty(), "enabledProtocols must not be empty");
delegate.setEnabledProtocols(enabledProtocols);
return this;
}

OtlpHttpMetricExporterBuilder exportAsJson() {
delegate.exportAsJson();
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.opentelemetry.sdk.common.export.RetryPolicy;
import io.opentelemetry.sdk.common.internal.StandardComponentId;
import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -275,6 +276,22 @@ public OtlpHttpSpanExporterBuilder setExecutorService(ExecutorService executorSe
return this;
}

/**
* Sets the TLS protocol versions to enable when connecting to an HTTPS endpoint. Pass {@code
* null} to defer to the sender implementation's default.
*
* <p>Protocol names follow the JSSE convention: {@code "TLSv1.2"}, {@code "TLSv1.3"}, etc.
*
* <p>Note: enabling legacy protocol versions (TLSv1, TLSv1.1) also requires removing them from
* the JVM's {@code jdk.tls.disabledAlgorithms} security property.
*/
public OtlpHttpSpanExporterBuilder setEnabledProtocols(List<String> enabledProtocols) {
requireNonNull(enabledProtocols, "enabledProtocols");
checkArgument(!enabledProtocols.isEmpty(), "enabledProtocols must not be empty");
delegate.setEnabledProtocols(enabledProtocols);
return this;
}

/**
* Constructs a new instance of the exporter based on the builder's values.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class GrpcExporterBuilder {
private ComponentLoader componentLoader =
ComponentLoader.forClassLoader(GrpcExporterBuilder.class.getClassLoader());
@Nullable private ExecutorService executorService;
@Nullable private List<String> enabledProtocols;

// Use Object type since gRPC may not be on the classpath.
@Nullable private Object grpcChannel;
Expand Down Expand Up @@ -170,6 +171,11 @@ public GrpcExporterBuilder setExecutorService(ExecutorService executorService) {
return this;
}

public GrpcExporterBuilder setEnabledProtocols(@Nullable List<String> enabledProtocols) {
this.enabledProtocols = enabledProtocols;
return this;
}

@SuppressWarnings("BuilderReturnThis")
public GrpcExporterBuilder copy() {
GrpcExporterBuilder copy =
Expand All @@ -189,6 +195,7 @@ public GrpcExporterBuilder copy() {
copy.internalTelemetryVersion = internalTelemetryVersion;
copy.grpcChannel = grpcChannel;
copy.componentLoader = componentLoader;
copy.enabledProtocols = enabledProtocols;
return copy;
}

Expand Down Expand Up @@ -232,7 +239,8 @@ public GrpcExporter build() {
grpcChannel,
// 4mb to align with spec guidance - even though we don't do anything with the
// response today, we will so better to have future-looking memory profile
4 * 1024L * 1024L));
4 * 1024L * 1024L,
enabledProtocols));
LOGGER.log(Level.FINE, "Using GrpcSender: " + grpcSender.getClass().getName());

return new GrpcExporter(
Expand Down Expand Up @@ -265,6 +273,9 @@ public String toString(boolean includePrefixAndSuffix) {
if (retryPolicy != null) {
joiner.add("retryPolicy=" + retryPolicy);
}
if (enabledProtocols != null) {
joiner.add("enabledProtocols=" + enabledProtocols);
}
if (grpcChannel != null) {
joiner.add("grpcChannel=" + grpcChannel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public final class HttpExporterBuilder {
private ComponentLoader componentLoader =
ComponentLoader.forClassLoader(HttpExporterBuilder.class.getClassLoader());
@Nullable private ExecutorService executorService;
@Nullable private List<String> enabledProtocols;

public HttpExporterBuilder(
StandardComponentId.ExporterType exporterType, String defaultEndpoint) {
Expand Down Expand Up @@ -167,6 +168,11 @@ public HttpExporterBuilder setExecutorService(ExecutorService executorService) {
return this;
}

public HttpExporterBuilder setEnabledProtocols(@Nullable List<String> enabledProtocols) {
this.enabledProtocols = enabledProtocols;
return this;
}

public HttpExporterBuilder exportAsJson() {
this.exportAsJson = true;
exporterType = mapToJsonTypeIfPossible(exporterType);
Expand Down Expand Up @@ -204,6 +210,7 @@ public HttpExporterBuilder copy() {
copy.internalTelemetryVersion = internalTelemetryVersion;
copy.proxyOptions = proxyOptions;
copy.componentLoader = componentLoader;
copy.enabledProtocols = enabledProtocols;
return copy;
}

Expand Down Expand Up @@ -247,7 +254,8 @@ public HttpExporter build() {
executorService,
// 4mb to align with spec guidance - even though we don't do anything with the
// response today, we will so better to have future-looking memory profile
4 * 1024L * 1024L));
4 * 1024L * 1024L,
enabledProtocols));
LOGGER.log(Level.FINE, "Using HttpSender: " + httpSender.getClass().getName());

return new HttpExporter(
Expand Down Expand Up @@ -282,6 +290,9 @@ public String toString(boolean includePrefixAndSuffix) {
if (retryPolicy != null) {
joiner.add("retryPolicy=" + retryPolicy);
}
if (enabledProtocols != null) {
joiner.add("enabledProtocols=" + enabledProtocols);
}
joiner.add("componentLoader=" + componentLoader);
if (executorService != null) {
joiner.add("executorService=" + executorService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public static ImmutableGrpcSenderConfig create(
@Nullable X509TrustManager trustManager,
@Nullable ExecutorService executorService,
@Nullable Object managedChannel,
long maxResponseBodySize) {
long maxResponseBodySize,
@Nullable List<String> enabledProtocols) {
return new AutoValue_ImmutableGrpcSenderConfig(
endpoint,
fullMethodName,
Expand All @@ -52,9 +53,14 @@ public static ImmutableGrpcSenderConfig create(
trustManager,
executorService,
managedChannel,
maxResponseBodySize);
maxResponseBodySize,
enabledProtocols);
}

@Override
public abstract long getMaxResponseBodySize();

@Override
@Nullable
public abstract List<String> getEnabledProtocols();
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ static HttpSenderConfig create(
@Nullable SSLContext sslContext,
@Nullable X509TrustManager trustManager,
@Nullable ExecutorService executorService,
long maxResponseBodySize) {
long maxResponseBodySize,
@Nullable List<String> enabledProtocols) {
return new AutoValue_ImmutableHttpSenderConfig(
endpoint,
contentType,
Expand All @@ -49,9 +50,14 @@ static HttpSenderConfig create(
sslContext,
trustManager,
executorService,
maxResponseBodySize);
maxResponseBodySize,
enabledProtocols);
}

@Override
public abstract long getMaxResponseBodySize();

@Override
@Nullable
public abstract List<String> getEnabledProtocols();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.opentelemetry.sdk.common.internal.StandardComponentId;
import java.net.URI;
import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -299,6 +300,22 @@ public OtlpGrpcLogRecordExporterBuilder setExecutorService(ExecutorService execu
return this;
}

/**
* Sets the TLS protocol versions to enable when connecting to an HTTPS endpoint. Pass {@code
* null} to defer to the sender implementation's default.
*
* <p>Protocol names follow the JSSE convention: {@code "TLSv1.2"}, {@code "TLSv1.3"}, etc.
*
* <p>Note: enabling legacy protocol versions (TLSv1, TLSv1.1) also requires removing them from
* the JVM's {@code jdk.tls.disabledAlgorithms} security property.
*/
public OtlpGrpcLogRecordExporterBuilder setEnabledProtocols(List<String> enabledProtocols) {
requireNonNull(enabledProtocols, "enabledProtocols");
checkArgument(!enabledProtocols.isEmpty(), "enabledProtocols must not be empty");
delegate.setEnabledProtocols(enabledProtocols);
return this;
}

/**
* Constructs a new instance of the exporter based on the builder's values.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.net.URI;
import java.time.Duration;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -357,6 +358,22 @@ public OtlpGrpcMetricExporterBuilder setExecutorService(ExecutorService executor
return this;
}

/**
* Sets the TLS protocol versions to enable when connecting to an HTTPS endpoint. Pass {@code
* null} to defer to the sender implementation's default.
*
* <p>Protocol names follow the JSSE convention: {@code "TLSv1.2"}, {@code "TLSv1.3"}, etc.
*
* <p>Note: enabling legacy protocol versions (TLSv1, TLSv1.1) also requires removing them from
* the JVM's {@code jdk.tls.disabledAlgorithms} security property.
*/
public OtlpGrpcMetricExporterBuilder setEnabledProtocols(List<String> enabledProtocols) {
requireNonNull(enabledProtocols, "enabledProtocols");
checkArgument(!enabledProtocols.isEmpty(), "enabledProtocols must not be empty");
delegate.setEnabledProtocols(enabledProtocols);
return this;
}

/**
* Constructs a new instance of the exporter based on the builder's values.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.opentelemetry.sdk.common.internal.StandardComponentId;
import java.net.URI;
import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -297,6 +298,22 @@ public OtlpGrpcSpanExporterBuilder setExecutorService(ExecutorService executorSe
return this;
}

/**
* Sets the TLS protocol versions to enable when connecting to an HTTPS endpoint. Pass {@code
* null} to defer to the sender implementation's default.
*
* <p>Protocol names follow the JSSE convention: {@code "TLSv1.2"}, {@code "TLSv1.3"}, etc.
*
* <p>Note: enabling legacy protocol versions (TLSv1, TLSv1.1) also requires removing them from
* the JVM's {@code jdk.tls.disabledAlgorithms} security property.
*/
public OtlpGrpcSpanExporterBuilder setEnabledProtocols(List<String> enabledProtocols) {
requireNonNull(enabledProtocols, "enabledProtocols");
checkArgument(!enabledProtocols.isEmpty(), "enabledProtocols must not be empty");
delegate.setEnabledProtocols(enabledProtocols);
return this;
}

/**
* Constructs a new instance of the exporter based on the builder's values.
*
Expand Down
Loading
Loading