Skip to content

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

Closed
wu-sheng wants to merge 3 commits into
mainfrom
transform-config
Closed

Expose config to set up the re-transform support explicitly#636
wu-sheng wants to merge 3 commits into
mainfrom
transform-config

Conversation

@wu-sheng

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

Copy link
Copy Markdown
Member

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

lujiajing1126 commented Oct 27, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member Author

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

@lujiajing1126 lujiajing1126 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kylixs

kylixs commented Oct 28, 2023

Copy link
Copy Markdown
Member

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

@wu-sheng

Copy link
Copy Markdown
Member Author

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

@kylixs

kylixs commented Oct 28, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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

kylixs commented Oct 28, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

@wu-sheng

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

kylixs commented Oct 28, 2023

Copy link
Copy Markdown
Member

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

@wu-sheng

Copy link
Copy Markdown
Member Author

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

@wu-sheng

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