Skip to content

应用部署在发行版tomcat的支持#1532

Open
Yaxx19 wants to merge 2 commits into
sermant-io:developfrom
Yaxx19:develop
Open

应用部署在发行版tomcat的支持#1532
Yaxx19 wants to merge 2 commits into
sermant-io:developfrom
Yaxx19:develop

Conversation

@Yaxx19
Copy link
Copy Markdown

@Yaxx19 Yaxx19 commented Jun 4, 2024

What type of PR is this?

发行版tomcat的支持

What this PR does / why we need it?

对tomcat的org.apache.catalina.loader.WebappClassLoaderBase进行增强
织入点选择loadClass和getResourceAsStream

Which issue(s) this PR fixes?

Fixes #1519

Does this PR introduce a user-facing change?

No

Checklist

  • Make sure there is a GitHub_issue related with this PR before you start working on it.
  • Make sure you have squashed your change to one single commit.
  • GitHub Actions works fine in this PR.

Yaxx19 added 2 commits June 4, 2024 11:00
Signed-off-by: Yaxx19 <yaxx19@foxmail.com>
Signed-off-by: Yaxx19 <yaxx19@foxmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2024

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...bappClassLoaderGetResourceAsStreamInterceptor.java 0.00% 15 Missing ⚠️
.../agent/enhance/AbstractClassLoaderInterceptor.java 0.00% 14 Missing ⚠️
...lugin/agent/enhance/WebappClassLoaderDeclarer.java 0.00% 5 Missing ⚠️
.../sermant/core/plugin/agent/ByteEnhanceManager.java 0.00% 1 Missing ⚠️
...nt/enhance/ClassLoaderFindResourceInterceptor.java 0.00% 1 Missing ⚠️
...agent/enhance/ClassLoaderLoadClassInterceptor.java 0.00% 1 Missing ⚠️
Flag Coverage Δ Complexity Δ
unittests 43.38% <0.00%> (+0.49%) 181.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ Complexity Δ
.../sermant/core/plugin/agent/ByteEnhanceManager.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...nt/enhance/ClassLoaderFindResourceInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...agent/enhance/ClassLoaderLoadClassInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...lugin/agent/enhance/WebappClassLoaderDeclarer.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../agent/enhance/AbstractClassLoaderInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...bappClassLoaderGetResourceAsStreamInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)

... and 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

essentialPackage = ConfigManager.getConfig(InjectConfig.class).getEssentialPackage();
}

protected boolean isSermantClass(String name) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

add Javadoc comment for isSermantClass and isSermantResource

@@ -0,0 +1,44 @@
package io.sermant.core.plugin.agent.enhance;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

import java.util.logging.Logger;

/**
* 发行版Tomcat ClassLoader getResourceAsStream 增强
Copy link
Copy Markdown
Collaborator

@lilai23 lilai23 Jun 6, 2024

Choose a reason for hiding this comment

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

i hope all comments could be in english, As well as PR description and commit message

@lilai23
Copy link
Copy Markdown
Collaborator

lilai23 commented Jun 6, 2024

Make sure you have squashed your change to one single commit.

@lilai23
Copy link
Copy Markdown
Collaborator

lilai23 commented Jun 6, 2024

Have you ever test this in war and tomcat?

@lilai23
Copy link
Copy Markdown
Collaborator

lilai23 commented Jul 26, 2024

@Yaxx19 could you resolve conversations and confilcts above?

@chengyouling
Copy link
Copy Markdown
Collaborator

@Yaxx19
Is there any time to solve the problems of the PR? If you don't have time, can I submit a new PR to solve this problem.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

关于ClassLoader增强

3 participants