Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 108 additions & 1 deletion docs/apidiffs/current_vs_latest/opentelemetry-sdk-common.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,109 @@
Comparing source compatibility of opentelemetry-sdk-common-1.59.0-SNAPSHOT.jar against opentelemetry-sdk-common-1.58.0.jar
No changes.
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.Compressor (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.io.OutputStream compress(java.io.OutputStream)
+++ NEW EXCEPTION: java.io.IOException
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getEncoding()
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.GrpcResponse (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) byte[] getResponseMessage()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.GrpcStatusCode getStatusCode()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getStatusDescription()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.GrpcSender (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void send(io.opentelemetry.sdk.common.export.MessageWriter, java.util.function.Consumer<io.opentelemetry.sdk.common.export.GrpcResponse>, java.util.function.Consumer<java.lang.Throwable>)
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.CompletableResultCode shutdown()
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.GrpcSenderConfig (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.Compressor getCompressor()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.time.Duration getConnectTimeout()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.net.URI getEndpoint()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.util.concurrent.ExecutorService getExecutorService()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getFullMethodName()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.util.function.Supplier<java.util.Map<java.lang.String,java.util.List<java.lang.String>>> getHeadersSupplier()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.RetryPolicy getRetryPolicy()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) javax.net.ssl.SSLContext getSslContext()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.time.Duration getTimeout()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) javax.net.ssl.X509TrustManager getTrustManager()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.GrpcSenderProvider (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.GrpcSender createSender(io.opentelemetry.sdk.common.export.GrpcSenderConfig)
+++ NEW ENUM: PUBLIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode (compatible)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW INTERFACE: java.lang.constant.Constable
+++ NEW INTERFACE: java.lang.Comparable
+++ NEW INTERFACE: java.io.Serializable
+++ NEW SUPERCLASS: java.lang.Enum
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode RESOURCE_EXHAUSTED
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode ALREADY_EXISTS
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode UNIMPLEMENTED
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode FAILED_PRECONDITION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode NOT_FOUND
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode DEADLINE_EXCEEDED
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode OUT_OF_RANGE
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode UNAUTHENTICATED
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode CANCELLED
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode DATA_LOSS
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode INTERNAL
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode UNAVAILABLE
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode UNKNOWN
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode ABORTED
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode OK
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode INVALID_ARGUMENT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.sdk.common.export.GrpcStatusCode PERMISSION_DENIED
+++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.sdk.common.export.GrpcStatusCode fromValue(int)
+++ NEW METHOD: PUBLIC(+) int getValue()
+++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.sdk.common.export.GrpcStatusCode valueOf(java.lang.String)
+++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.sdk.common.export.GrpcStatusCode[] values()
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.HttpResponse (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) byte[] getResponseBody()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) int getStatusCode()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getStatusMessage()
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.HttpSender (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void send(io.opentelemetry.sdk.common.export.MessageWriter, java.util.function.Consumer<io.opentelemetry.sdk.common.export.HttpResponse>, java.util.function.Consumer<java.lang.Throwable>)
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.CompletableResultCode shutdown()
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.HttpSenderConfig (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.Compressor getCompressor()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.time.Duration getConnectTimeout()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getContentType()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.net.URI getEndpoint()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.util.concurrent.ExecutorService getExecutorService()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.util.function.Supplier<java.util.Map<java.lang.String,java.util.List<java.lang.String>>> getHeadersSupplier()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.ProxyOptions getProxyOptions()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.RetryPolicy getRetryPolicy()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) javax.net.ssl.SSLContext getSslContext()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.time.Duration getTimeout()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) javax.net.ssl.X509TrustManager getTrustManager()
+++ NEW ANNOTATION: javax.annotation.Nullable
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.HttpSenderProvider (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.HttpSender createSender(io.opentelemetry.sdk.common.export.HttpSenderConfig)
+++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.MessageWriter (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) int getContentLength()
+++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void writeMessage(java.io.OutputStream)
+++ NEW EXCEPTION: java.io.IOException
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

package io.opentelemetry.exporter.internal;

import io.opentelemetry.exporter.internal.grpc.GrpcResponse;
import io.opentelemetry.exporter.internal.http.HttpSender;
import io.opentelemetry.sdk.common.export.GrpcResponse;
import io.opentelemetry.sdk.common.export.HttpResponse;
import javax.annotation.Nullable;

/**
Expand All @@ -24,7 +24,7 @@ private FailedExportException(@Nullable Throwable cause) {
}

/** Indicates an HTTP export failed after receiving a response from the server. */
public static HttpExportException httpFailedWithResponse(HttpSender.Response response) {
public static HttpExportException httpFailedWithResponse(HttpResponse response) {
return new HttpExportException(response, null);
}

Expand Down Expand Up @@ -56,10 +56,10 @@ public static final class HttpExportException extends FailedExportException {

private static final long serialVersionUID = -6787390183017184775L;

@Nullable private final HttpSender.Response response;
@Nullable private final HttpResponse response;
@Nullable private final Throwable cause;

private HttpExportException(@Nullable HttpSender.Response response, @Nullable Throwable cause) {
private HttpExportException(@Nullable HttpResponse response, @Nullable Throwable cause) {
super(cause);
this.response = response;
this.cause = cause;
Expand All @@ -75,7 +75,7 @@ public boolean failedWithResponse() {
* export failed exceptionally with no response.
*/
@Nullable
public HttpSender.Response getResponse() {
public HttpResponse getResponse() {
return response;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package io.opentelemetry.exporter.internal;

import io.opentelemetry.exporter.internal.grpc.GrpcExporterUtil;
import io.opentelemetry.sdk.common.export.GrpcStatusCode;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
Expand All @@ -24,13 +24,13 @@ public final class RetryUtil {

static {
Set<Integer> retryableGrpcStatusCodes = new HashSet<>();
retryableGrpcStatusCodes.add(GrpcExporterUtil.GRPC_STATUS_CANCELLED);
retryableGrpcStatusCodes.add(GrpcExporterUtil.GRPC_STATUS_DEADLINE_EXCEEDED);
retryableGrpcStatusCodes.add(GrpcExporterUtil.GRPC_STATUS_RESOURCE_EXHAUSTED);
retryableGrpcStatusCodes.add(GrpcExporterUtil.GRPC_STATUS_ABORTED);
retryableGrpcStatusCodes.add(GrpcExporterUtil.GRPC_STATUS_OUT_OF_RANGE);
retryableGrpcStatusCodes.add(GrpcExporterUtil.GRPC_STATUS_UNAVAILABLE);
retryableGrpcStatusCodes.add(GrpcExporterUtil.GRPC_STATUS_DATA_LOSS);
retryableGrpcStatusCodes.add(GrpcStatusCode.CANCELLED.getValue());
retryableGrpcStatusCodes.add(GrpcStatusCode.DEADLINE_EXCEEDED.getValue());
retryableGrpcStatusCodes.add(GrpcStatusCode.RESOURCE_EXHAUSTED.getValue());
retryableGrpcStatusCodes.add(GrpcStatusCode.ABORTED.getValue());
retryableGrpcStatusCodes.add(GrpcStatusCode.OUT_OF_RANGE.getValue());
retryableGrpcStatusCodes.add(GrpcStatusCode.UNAVAILABLE.getValue());
retryableGrpcStatusCodes.add(GrpcStatusCode.DATA_LOSS.getValue());
RETRYABLE_GRPC_STATUS_CODES =
Collections.unmodifiableSet(
retryableGrpcStatusCodes.stream().map(Object::toString).collect(Collectors.toSet()));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import static java.util.stream.Collectors.joining;

import io.opentelemetry.common.ComponentLoader;
import io.opentelemetry.sdk.common.export.Compressor;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
Expand All @@ -19,11 +20,10 @@
*
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
* at any time.
*
* @see CompressorProvider
*/
public final class CompressorUtil {

private static final GzipCompressor gzipCompressor = new GzipCompressor();
private static final Map<String, Compressor> compressorRegistry =
buildCompressorRegistry(
ComponentLoader.forClassLoader(CompressorUtil.class.getClassLoader()));
Expand Down Expand Up @@ -67,12 +67,11 @@ public static Compressor validateAndResolveCompressor(

private static Map<String, Compressor> buildCompressorRegistry(ComponentLoader componentLoader) {
Map<String, Compressor> compressors = new HashMap<>();
for (CompressorProvider spi : componentLoader.load(CompressorProvider.class)) {
Compressor compressor = spi.getInstance();
for (Compressor compressor : componentLoader.load(Compressor.class)) {
compressors.put(compressor.getEncoding(), compressor);
}
// Hardcode gzip compressor
compressors.put(GzipCompressor.getInstance().getEncoding(), GzipCompressor.getInstance());
compressors.put(gzipCompressor.getEncoding(), gzipCompressor);
return compressors;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package io.opentelemetry.exporter.internal.compression;

import io.opentelemetry.sdk.common.export.Compressor;
import java.io.IOException;
import java.io.OutputStream;
import java.util.zip.GZIPOutputStream;
Expand All @@ -17,13 +18,7 @@
*/
public final class GzipCompressor implements Compressor {

private static final GzipCompressor INSTANCE = new GzipCompressor();

private GzipCompressor() {}

public static GzipCompressor getInstance() {
return INSTANCE;
}
public GzipCompressor() {}

@Override
public String getEncoding() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.exporter.internal.grpc;

import io.opentelemetry.sdk.common.export.GrpcSenderConfig;
import javax.annotation.Nullable;

/**
* Extended {@link GrpcSenderConfig} with internal / experimental APIs.
*
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
* at any time.
*/
public interface ExtendedGrpcSenderConfig extends GrpcSenderConfig {

@Nullable
Object getMangedChannel();
}
Loading
Loading