Skip to content

Conversation

@ebyhr
Copy link
Contributor

@ebyhr ebyhr commented Oct 17, 2025

I propose adding OpenTelemetry support to the HTTP client to improve traceability.
The screenshot shows the result of testing this PR with the Apache Polaris (incubating) and Trino.

Screenshot 2025-10-17 at 20 22 21

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?

@ebyhr ebyhr requested a review from singhpk234 November 27, 2025 10:12
@github-actions
Copy link

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 28, 2025
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 ?


HttpClientBuilder clientBuilder = HttpClients.custom();
HttpClientBuilder clientBuilder =
ApacheHttpClientTelemetry.builder(openTelemetry).build().newHttpClientBuilder();
Copy link
Contributor

Choose a reason for hiding this comment

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

can we only set openTelemetry when there is something set via builder, i understand default value is NoOp but it would still add interceptor to call of HTTP but i guess it will do nothing, having set by builder would make sure its only added when required, WDYT ?

Suggested change
ApacheHttpClientTelemetry.builder(openTelemetry).build().newHttpClientBuilder();
openTelemetry ? ApacheHttpClientTelemetry.builder(openTelemetry).build().newHttpClientBuilder() : HttpClients.custom();

nessie = "0.106.0"
netty-buffer = "4.2.9.Final"
object-client-bundle = "3.3.2"
opentelemetry-httpclient = "2.20.1-alpha"
Copy link
Contributor

Choose a reason for hiding this comment

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

please check on the licence part, if we are ok and if we need to update it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you let me know how to check? https://github.com/apache/iceberg/blob/main/aws-bundle/LICENSE you mentioned before only contains dependencies used in aws-bundle module. iceberg-core module doesn't have LICENSE file.

Copy link
Contributor

@singhpk234 singhpk234 Dec 28, 2025

Choose a reason for hiding this comment

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

Ah i see, what i wanted to mostly know is.the following :

  1. can we take a dependency on this, based on some ASF doc search it seems like we very well can :)
  2. LICENCE : Apologies i am not an expert in this, just wanted to be cautious on this before we introduce a new dependency to project and update the LICENCE if required accordingly.

Lets do this : once the CI is green (i believe a70abe3 addresses my latest feedbacks :)) i will go ahead and approve ! (thanks a lot for change, i can truly see the benefits of this) and lets wait for sometime for some licence | dependency experts to weigh in (i will ping some folks on slack too) before we go ahead and merge, WDYT ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That works for me. Thanks for your help, as always :)

@singhpk234 singhpk234 removed the stale label Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants