-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Add support for OpenTelemetry in HTTPClient #14360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| implementation libs.jackson.core | ||
| implementation libs.jackson.databind | ||
| implementation libs.caffeine | ||
| implementation libs.opentelemetry.httpclient |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
|
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. |
| return this; | ||
| } | ||
|
|
||
| public Builder withOpenTelemetry(OpenTelemetry openTelemetry) { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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 ?
| 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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :
- can we take a dependency on this, based on some ASF doc search it seems like we very well can :)
- 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 ?
There was a problem hiding this comment.
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 :)
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.