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
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ project(':iceberg-core') {
implementation libs.jackson.core
implementation libs.jackson.databind
implementation libs.caffeine
implementation libs.opentelemetry.httpclient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to update and LICENCE ?

Copy link
Contributor Author

@ebyhr ebyhr Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we update the root LICENSE file only when we copy code from another library. Am I wrong?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not fully aware but i think if we ship a dependency : https://github.com/apache/iceberg/blob/main/aws-bundle/LICENSE we just include it i think, not an expert in this though, just thought to bring since we are introducing a new dependency in the project

Copy link
Contributor Author

@ebyhr ebyhr Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry I was only looking at LICENSE file in the root directory. Let me check other LICENSE files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbonofre Do you happen to know the answer to the question above?

implementation libs.roaringbitmap
implementation libs.failsafe
compileOnly(libs.hadoop3.client) {
Expand Down
20 changes: 17 additions & 3 deletions core/src/main/java/org/apache/iceberg/rest/HTTPClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.instrumentation.apachehttpclient.v5_2.ApacheHttpClientTelemetry;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.net.URI;
Expand Down Expand Up @@ -113,13 +115,17 @@ private HTTPClient(
ObjectMapper objectMapper,
Map<String, String> properties,
HttpClientConnectionManager connectionManager,
AuthSession session) {
AuthSession session,
OpenTelemetry openTelemetry) {
this.baseUri = baseUri;
this.baseHeaders = baseHeaders;
this.mapper = objectMapper;
this.authSession = session;

HttpClientBuilder clientBuilder = HttpClients.custom();
HttpClientBuilder clientBuilder =
openTelemetry != null
? ApacheHttpClientTelemetry.builder(openTelemetry).build().newHttpClientBuilder()
: HttpClients.custom();

clientBuilder.setConnectionManager(connectionManager);

Expand Down Expand Up @@ -482,6 +488,7 @@ public static class Builder {
private HttpHost proxy;
private CredentialsProvider proxyCredentialsProvider;
private AuthSession authSession;
private OpenTelemetry telemetry;

private Builder(Map<String, String> properties) {
this.properties = properties;
Expand Down Expand Up @@ -536,6 +543,12 @@ public Builder withAuthSession(AuthSession session) {
return this;
}

public Builder withOpenTelemetry(OpenTelemetry openTelemetry) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to protect this with a precondition of this being not null ?

Preconditions.checkNotNull(openTelemetry, "Invalid openTelemetry for http client: null");
this.telemetry = openTelemetry;
return this;
}

public HTTPClient build() {
withHeader(CLIENT_VERSION_HEADER, IcebergBuild.fullVersion());
withHeader(CLIENT_GIT_COMMIT_SHORT_HEADER, IcebergBuild.gitCommitShortId());
Expand Down Expand Up @@ -579,7 +592,8 @@ public HTTPClient build() {
mapper,
properties,
configureConnectionManager(properties),
authSession);
authSession,
telemetry);
}
}
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ mockserver = "5.15.0"
nessie = "0.106.1"
netty-buffer = "4.2.9.Final"
object-client-bundle = "3.3.2"
opentelemetry-httpclient = "2.23.0-alpha"
orc = "1.9.8"
parquet = "1.17.0"
roaringbitmap = "1.3.0"
Expand Down Expand Up @@ -166,6 +167,7 @@ microprofile-openapi-api = { module = "org.eclipse.microprofile.openapi:micropro
nessie-client = { module = "org.projectnessie.nessie:nessie-client", version.ref = "nessie" }
netty-buffer = { module = "io.netty:netty-buffer", version.ref = "netty-buffer" }
object-client-bundle = { module = "com.emc.ecs:object-client-bundle", version.ref = "object-client-bundle" }
opentelemetry-httpclient = { module = "io.opentelemetry.instrumentation:opentelemetry-apache-httpclient-5.2", version.ref = "opentelemetry-httpclient" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pins an alpha OTel instrumentation artifact (2.20.1-alpha) and the module name is specifically opentelemetry-apache-httpclient-5.2 while Iceberg uses Apache HttpClient 5.6. Can we confirm this instrumentation is compatible with 5.6 (and that pulling opentelemetry-api-incubator alpha transitively is acceptable here)?

orc-core = { module = "org.apache.orc:orc-core", version.ref = "orc" }
parquet-avro = { module = "org.apache.parquet:parquet-avro", version.ref = "parquet" }
parquet-column = { module = "org.apache.parquet:parquet-column", version.ref = "parquet" }
Expand Down