Skip to content
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

Expose config to set up the re-transform support explicitly #636

Closed
wants to merge 3 commits into from

Conversation

wu-sheng
Copy link
Member

@wu-sheng wu-sheng commented Oct 27, 2023

I am waiting for @lujiajing1126 final report about this case in their environment.

@wu-sheng wu-sheng added enhancement New feature or request core labels Oct 27, 2023
@wu-sheng wu-sheng added this to the 9.1.0 milestone Oct 27, 2023
@wu-sheng wu-sheng marked this pull request as ready for review October 27, 2023 16:15
@lujiajing1126
Copy link
Contributor

lujiajing1126 commented Oct 27, 2023

For a real workload (Spring Boot application) with ~30 classes to be enhanced.

Local env

  • OS: macOS sonoma 14.0
  • JDK: 1.8.0_372
  • Hardware spec: Apple M2 with 16GB memory
DescriptionStrategy premain exec time*
POOL_FIRST ~6 secs
HYBRID ~3 secs
  • specifically agentBuilder.installOn(instrumentation)

@wu-sheng
Copy link
Member Author

@lujiajing1126 I updated the doc, please take a look.

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

@kylixs
Copy link
Member

kylixs commented Oct 28, 2023

This option might be better changed to enable or disable custom byte-buddy patch, for compatibility reasons.

@wu-sheng
Copy link
Member Author

Compatible with which part?
I am waiting for your PR feedback. If it is good enough, we don't need this.

@kylixs
Copy link
Member

kylixs commented Oct 28, 2023

Determine whether to use a custom AgentBuilder with patch or a normal one:

    private static AgentBuilder newAgentBuilder(SWDescriptionStrategy descriptionStrategy) {
        final ByteBuddy byteBuddy = new ByteBuddy()
                .with(TypeValidation.of(Config.Agent.IS_OPEN_DEBUGGING_CLASS))
                .with(new SWAuxiliaryTypeNamingStrategy(NAME_TRAIT))
                .with(new SWImplementationContextFactory(NAME_TRAIT));

        return new SWAgentBuilderDefault(byteBuddy, new SWNativeMethodStrategy(NAME_TRAIT))
                .with(descriptionStrategy);
    }

@wu-sheng
Copy link
Member Author

I don't think we need to expose. This should not be aware ny users.
Anyone doesn't read codes, don't know what this is about.

@kylixs
Copy link
Member

kylixs commented Oct 28, 2023

I mean the option is SW_ENABLE_RETRANSFORM_SUPPORT, disable byte-buddy patch if it is false. Users can understand this option.

@wu-sheng
Copy link
Member Author

I know your point. But I doubt they will know what path or our customization mean.

@wu-sheng
Copy link
Member Author

Like I documented, it should be a straight forward. If there are really some issues of your patch, that is a bug, nothing more

@kylixs
Copy link
Member

kylixs commented Oct 28, 2023

I agree. I'm just wondering if there's a fallback mechanism that can be enabled if something goes wrong.

@wu-sheng
Copy link
Member Author

Don't worry. 8.x is safe enough to fall back. 😊

@wu-sheng
Copy link
Member Author

Close for now, as we seems to have a solution now.

@wu-sheng wu-sheng closed this Oct 30, 2023
@wu-sheng wu-sheng deleted the transform-config branch October 30, 2023 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants