-
Notifications
You must be signed in to change notification settings - Fork 665
Fix the gson dependency in the kafka-reporter-plugin. (#10848) #538
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
| <artifactId>kafka-clients</artifactId> | ||
| <version>${kafka-clients.version}</version> | ||
| </dependency> | ||
| <dependency> |
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 don't think we need to explicitly add this dependency since we've already included apm-agent-core
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.
This is old code. Similar to Gson, the kafka-reporter-plugin does not use any dependencies from apm-agent-core.
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.
This is old code. Similar to Gson, the kafka-reporter-plugin does not use any dependencies from apm-agent-core.
IIRC, the shaded Gson library is already located in the agent-core jar. So just shading this library at compile-time is sufficient.
Just like what we've done for slf4j.
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.
This is old code.
This is something you added, this is not old code.
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.
This is old code. Similar to Gson, the kafka-reporter-plugin does not use any dependencies from apm-agent-core.
IIRC, the shaded Gson library is already located in the agent-core jar. So just shading this library at compile-time is sufficient.
Just like what we've done for slf4j.
You are right, I will give it a try.
| <packaging>jar</packaging> | ||
|
|
||
| <properties> | ||
| <shade.com.google.source>com.google</shade.com.google.source> |
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.
We don't need this. The property name is even longer than the original package name, there is no point.
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.
And, I don't think we are expecting shading all com.google. You are just going to shade GSON relative things. Please be clear about that.
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.
And, I don't think we are expecting shading all
com.google. You are just going to shade GSON relative things. Please be clear about that.
Let me optimize this.
wu-sheng
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.
This should be good. @lujiajing1126 It is better you could check locally.
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. I've compiled locally and everything is fine.
CHANGESlog.