Skip to content

Conversation

@gzlicanyi
Copy link
Contributor

@gzlicanyi gzlicanyi commented May 26, 2023

<artifactId>kafka-clients</artifactId>
<version>${kafka-clients.version}</version>
</dependency>
<dependency>
Copy link
Contributor

@lujiajing1126 lujiajing1126 May 26, 2023

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

Copy link
Contributor Author

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.

Copy link
Contributor

@lujiajing1126 lujiajing1126 May 26, 2023

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.

Copy link
Member

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.

Copy link
Contributor Author

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>
Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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 wu-sheng added the bug Something isn't working label May 26, 2023
@wu-sheng wu-sheng added this to the 8.16.0 milestone May 26, 2023
Copy link
Member

@wu-sheng wu-sheng left a 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.

Copy link
Contributor

@lujiajing1126 lujiajing1126 left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants