transmittable-thread-local icon indicating copy to clipboard operation
transmittable-thread-local copied to clipboard

support loading agent dynamically

Open tjstqq opened this issue 5 years ago • 8 comments

according to Java Agent and Instrumentation APIs,add entry "agentmain" and "Agent-Class" config in MANIFEST

tjstqq avatar Apr 02 '20 07:04 tjstqq

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 02 '20 07:04 CLAassistant

Codecov Report

Merging #170 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #170   +/-   ##
=========================================
  Coverage     74.68%   74.68%           
  Complexity      133      133           
=========================================
  Files            15       15           
  Lines           470      470           
  Branches         52       52           
=========================================
  Hits            351      351           
  Misses          104      104           
  Partials         15       15

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c3c03e4...fb47e05. Read the comment docs.

codecov-io avatar Apr 02 '20 08:04 codecov-io

我发现动态加载有时候会失败,ttl值没有正常生效。但是又找不到规律

zscgrhg avatar Apr 15 '20 08:04 zscgrhg

我发现动态加载有时候会失败,ttl值没有正常生效。但是又找不到规律

能否把调用的情况详细贴出来,方便分析下

tjstqq avatar Apr 16 '20 02:04 tjstqq

我发现动态加载有时候会失败,ttl值没有正常生效。但是又找不到规律

能否把调用的情况详细贴出来,方便分析下

暂时解决这个问题了,刚开始我是在junit rule 里面加载agent,这样会出现随机的结果,有时候生效,有时候无效,后面我改成在junit runner静态初始化的时候加载,就OK了。

zscgrhg avatar May 01 '20 05:05 zscgrhg

这种改动有什么用啊,attach上去以后,已经加载的类没法增强,得把所有类都redefine一遍才行、、、 除非在应用Main方法里就自己attach自己 不过我也找不到启动的时候不需要TTL,运行了一阵以后需要TTL的场景。

yungyu16 avatar Jul 11 '22 16:07 yungyu16

这种改动有什么用啊,attach上去以后,已经加载的类没法增强,得把所有类都redefine一遍才行、、、 除非在应用Main方法里就自己attach自己 不过我也找不到启动的时候不需要TTL,运行了一阵以后需要TTL的场景。

嗯,这个改动是不够的。

一些展开的讨论

  • #169

oldratlee avatar Jul 11 '22 17:07 oldratlee

Codecov Report

Base: 71.60% // Head: 71.60% // No change to project coverage :thumbsup:

Coverage data is based on head (b905466) compared to base (d70f33a). Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #170   +/-   ##
=========================================
  Coverage     71.60%   71.60%           
  Complexity      134      134           
=========================================
  Files            15       15           
  Lines           493      493           
  Branches         53       53           
=========================================
  Hits            353      353           
  Misses          127      127           
  Partials         13       13           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Sep 23 '22 07:09 codecov-commenter