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

流量标签透传特性:支持跨线程传递标签 #1268

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

lilai23
Copy link
Collaborator

@lilai23 lilai23 commented Aug 2, 2023

【修复issue】#1244

【修改内容】支持跨线程传递标签,该能力可单独使用,可与其他插件配合获取和传递请求信息。
该能力从路由插件中抽出,路由插件后续需相应重构适配。

【用例描述】1、直接new thread创建新线程,测试结果父线程的标签可以在子线程中获取;2、通过ExecutorService的submit、execute方法创建新线程,测试结果父线程的标签可以在子线程中获取;3、通过ScheduledExecutorService的schedule、scheduleAtFixedRate、scheduleWithFixedDelay方法创建新线程,测试结果父线程的标签可以在子线程中获取;

【自测情况】1、本地静态检查通过;2、本地自测通过

【影响范围】当前PR和流量标签透传插件不影响其他插件使用;后续需重构路由插件。

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.65% 🎉

Comparison is base (4427972) 42.00% compared to head (8bd065b) 42.65%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #1268      +/-   ##
=============================================
+ Coverage      42.00%   42.65%   +0.65%     
- Complexity      3197     3230      +33     
=============================================
  Files            815      816       +1     
  Lines          17740    17762      +22     
  Branches        1934     1935       +1     
=============================================
+ Hits            7451     7576     +125     
+ Misses          9358     9234     -124     
- Partials         931      952      +21     
Flag Coverage Δ
unittests 42.65% <0.00%> (+0.65%) ⬆️

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

Files Changed Coverage Δ
...rmant/core/plugin/agent/matcher/MethodMatcher.java 0.00% <0.00%> (ø)
.../sermant/core/plugin/agent/matcher/MethodType.java 0.00% <0.00%> (ø)
...uaweicloud/sermant/core/utils/tag/TrafficData.java 0.00% <0.00%> (ø)
...aweicloud/sermant/core/utils/tag/TrafficUtils.java 0.00% <0.00%> (ø)

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lilai23 lilai23 added kind/feature Issue for new feature area/plugin Issues or PRs releated to sermant plugin service labels Aug 2, 2023
@lilai23 lilai23 added this to the v1.2.0 milestone Aug 2, 2023
@lilai23 lilai23 self-assigned this Aug 2, 2023
@lilai23 lilai23 force-pushed the tag_trans branch 3 times, most recently from 15d9bee to b7c34ac Compare August 8, 2023 08:00
支持跨线程传递标签,该能力可单独使用,可与路由等其他插件配合传递请求信息。
@Sherlockhan Sherlockhan merged commit c8fca81 into sermant-io:develop Aug 9, 2023
@hanbingleixue hanbingleixue removed this from the v1.2.0 milestone Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin Issues or PRs releated to sermant plugin service kind/feature Issue for new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants