-
Notifications
You must be signed in to change notification settings - Fork 14.8k
KAFKA-15668: Adding Opentelmetry shadowed library (KIP-714) #14618
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
Conversation
AndrewJSchofield
left a comment
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.
lgtm
|
Build is failing because of flaky tests: |
mjsax
left a comment
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 am not a gradle expert. Maybe @ijuma can take a look?
| if (!shouldPublishWithShadow) { | ||
| from components.java | ||
| } else { | ||
| apply plugin: 'com.github.johnrengelman.shadow' |
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.
What is this plugin? Does not look like something official? Not sure if we should use something that is no backed by some official OSS 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.
Valid ask, we require this plugin to move Opentelemetry required libs as shadowed to avoid version conflicts when higher version of these commonly used libraries are present in user's application code, but this link for the plugin details better. This dependency is not introduced in this PR rather being already used in Kafka for a while:
Line 47 in f0e9739
| id 'com.github.johnrengelman.shadow' version '8.1.1' apply false |
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.
Thanks. Yes, I understood already what the plugin does.
This dependency is not introduced in this PR rather being already used in Kafka for a while:
This was my concern, but if it's already established my concerns are void.
|
@apoorvmittal10 could we show a diff before/after this change of:
to make sure the only difference in the resulting artifact are those shaded classes? |
@xvrl Please find the details below, AK |
I think we should minimize the differences. Unless the protos are actually necessary at runtime, I think we should omit them to avoid polluting the jar with unnecessary resources.
It looks like we are adding opentelemetry-proto as a runtime dependency, that doesn't look right. Since the proto dependencies are already included in the jar and relocated, the resulting pom should be identical. |
xvrl
left a comment
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.
looks like the pom file is still defining unnecessary runtime dependencies, and ideally we do not add extraneous resource files to the jar.
I have updated the build file and below are the results; tldr there is no change in pom and jar other than shaded libs. |
xvrl
left a comment
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.
one minor suggestion, otherwise LGTM
Co-authored-by: Xavier Léauté <xl+github@xvrl.net>
Thanks @xvrl, I have added the suggestion. |
|
@wcarlson5 @mjsax 16 tests unrelated to the PR are failing. As we have +1 from @xvrl hence can we please merge this PR now. Thanks for the help. |
|
Thanks for all the review help @xvrl! Merged to |
…4618) Part of KIP-714. The PR comprises of changes to include opentlemetry library as defined in KIP-714. The libraries are shadowed to prevent conflicts. Co-authored-by: Xavier Léauté <xl+github@xvrl.net> Reviewers: Andrew Schofield <aschofield@confluent.io>, Xavier Léauté <xavier@confluent.io>, Walker Carlson <wcarlson@confluent.io>, Matthias J. Sax <matthias@confluent.io>
…4618) Part of KIP-714. The PR comprises of changes to include opentlemetry library as defined in KIP-714. The libraries are shadowed to prevent conflicts. Co-authored-by: Xavier Léauté <xl+github@xvrl.net> Reviewers: Andrew Schofield <aschofield@confluent.io>, Xavier Léauté <xavier@confluent.io>, Walker Carlson <wcarlson@confluent.io>, Matthias J. Sax <matthias@confluent.io>




The PR comprises of changes to include opentlemetry library as defined in KIP-714. The libraries are shadowed to prevent conflicts.
https://central.sonatype.com/artifact/org.apache.kafka/kafka-clients/3.6.0/overview details the 3.6.0 java client pom with runtime dependencies and current changes maintains that behaviour. Outputting the pom below:
Committer Checklist (excluded from commit message)