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

feature: support apm with skywalking #3652

Merged
merged 27 commits into from
May 20, 2021
Merged

Conversation

zhaoyuguang
Copy link
Member

Ⅰ. Describe what this PR did

support apm with skywalking

Ⅱ. Does this pull request fix one issue?

#714
#884
apache/skywalking#6579

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@slievrly slievrly added this to the 1.5.0 milestone Apr 22, 2021
@slievrly
Copy link
Member

@wu-sheng , @zhaoyuguang What do you think of using ASF or Seata license header in code files? The Seata community supports the both and fully respects intellectual property rights.
cd21703

@wu-sheng
Copy link
Member

From my understanding, all codes contributed here should be licensed to the Seata community. SkyWalking just provides the tech stack, dependencies. If you have a LICENSE file for the binary distribution, please add Apache SkyWalking in it.

@slievrly
Copy link
Member

From my understanding, all codes contributed here should be licensed to the Seata community. SkyWalking just provides the tech stack, dependencies. If you have a LICENSE file for the binary distribution, please add Apache SkyWalking in it.

Do you mean that it needs to add Apache Skywalking in https://github.com/seata/seata/blob/1ec5e031de2de113859b74789f2b72ea91c1cf75/distribution/LICENSE-BIN ?

@wu-sheng
Copy link
Member

Yes, take this as an example of the official Apache Software Foundation's way.

https://github.com/apache/skywalking/blob/master/dist-material/release-docs/LICENSE#L204

@slievrly
Copy link
Member

cc @zhaoyuguang

@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2021

Codecov Report

Merging #3652 (9f3448a) into develop (373d538) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3652      +/-   ##
=============================================
- Coverage      51.28%   51.25%   -0.03%     
+ Complexity      3573     3570       -3     
=============================================
  Files            645      645              
  Lines          21814    21814              
  Branches        2740     2736       -4     
=============================================
- Hits           11187    11181       -6     
- Misses          9487     9496       +9     
+ Partials        1140     1137       -3     
Impacted Files Coverage Δ Complexity Δ
...erver/storage/file/session/FileSessionManager.java 51.82% <0.00%> (-5.11%) 26.00% <0.00%> (-1.00%)
...tasource/sql/struct/cache/MysqlTableMetaCache.java 80.45% <0.00%> (-1.15%) 10.00% <0.00%> (-1.00%)
...o/seata/server/coordinator/DefaultCoordinator.java 52.11% <0.00%> (-0.47%) 27.00% <0.00%> (-1.00%)
...rage/redis/store/RedisTransactionStoreManager.java 63.59% <0.00%> (-0.44%) 38.00% <0.00%> (-1.00%)
...in/java/io/seata/server/session/GlobalSession.java 83.04% <0.00%> (-0.44%) 75.00% <0.00%> (-1.00%)
...torage/file/store/FileTransactionStoreManager.java 57.69% <0.00%> (+0.64%) 29.00% <0.00%> (+1.00%)
...n/src/main/java/io/seata/common/util/IdWorker.java 83.33% <0.00%> (+6.25%) 12.00% <0.00%> (+1.00%)

@zhaoyuguang
Copy link
Member Author

@slievrly @wu-sheng LICENSE file update, please recheck

@zhaoyuguang
Copy link
Member Author

@wu-sheng From the Seata project package style, I want to change the plugin package to io.seata.skywalking.plugin, can i ?

@wu-sheng
Copy link
Member

@wu-sheng From the Seata project package style, I want to change the plugin package to io.seata.skywalking.plugin, can i ?

Yes, of course, it is better to use seata package name, as they host codes.

@wu-sheng
Copy link
Member

BTW, please remember to update Seata website/doc page, about how to use this.
You could take this as a reference, https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/skywalking-agent-deployment.html

@zhaoyuguang
Copy link
Member Author

BTW, please remember to update Seata website/doc page, about how to use this.
You could take this as a reference, https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/skywalking-agent-deployment.html

Yes, the PR only focused on plugin monitoring code, Next is the construction of official website documents

@wu-sheng
Copy link
Member

Is this going to merge now? Is this ready? @slievrly

@funky-eyes funky-eyes requested a review from slievrly May 6, 2021 06:01
Copy link
Contributor

@caohdgege caohdgege left a comment

Choose a reason for hiding this comment

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

@slievrly @wu-sheng LICENSE file update, please recheck

@zhaoyuguang Please modify the LICENSE-BIN under the distribution folder at the meantime

@slievrly
Copy link
Member

slievrly commented May 8, 2021

It's already in the pipeline process of code review and function test. Assigned to @caohdgege @selfishlover .

@wu-sheng
Copy link
Member

wu-sheng commented May 8, 2021

Hi, I want to give a reminder, DolphinScheduler has a SkyWalking agent installation out of box. https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/skywalking-agent-deployment.html

A user just needs a system env setup, or several new lines in install_config.conf. Then the agent is good to go.

Right now, this PR seems doesn't have related things. Then, the user will need several manual steps to make all things ready to go.

At the same time, only because of using that way, you should update the LICENSE. If you only host plugin source codes and binary, both of them actually belong to the Seata project, rather than SkyWalking. SkyWalking becomes a compiling level dependency.

@zhaoyuguang @slievrly I think from the original discussion and issue description, we should have skywalking agent with all necessary plugins(not all skywalking's plugins) packaged into Seata's distribution. Could you confirm this?

Copy link
Contributor

@caohdgege caohdgege left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly
Copy link
Member

a little problem,the component information of Span shows as unknown.
image

@wu-sheng
Copy link
Member

a little problem,the component information of Span shows as unknown.
image

I think this is caused by component metadata is not included in the latest release, but will be in next.

@wu-sheng
Copy link
Member

If you want, could add one in the component library YAML file.

@slievrly
Copy link
Member

a little problem,the component information of Span shows as unknown.
image

I think this is caused by component metadata is not included in the latest release, but will be in next.

a little problem,the component information of Span shows as unknown.
image

I think this is caused by component metadata is not included in the latest release, but will be in next.

It is my fault. I have seen the above issue comment (#3652 (comment).

@slievrly
Copy link
Member

Hi, I want to give a reminder, DolphinScheduler has a SkyWalking agent installation out of box. https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/skywalking-agent-deployment.html

A user just needs a system env setup, or several new lines in install_config.conf. Then the agent is good to go.

Right now, this PR seems doesn't have related things. Then, the user will need several manual steps to make all things ready to go.

At the same time, only because of using that way, you should update the LICENSE. If you only host plugin source codes and binary, both of them actually belong to the Seata project, rather than SkyWalking. SkyWalking becomes a compiling level dependency.

@zhaoyuguang @slievrly I think from the original discussion and issue description, we should have skywalking agent with all necessary plugins(not all skywalking's plugins) packaged into Seata's distribution. Could you confirm this?

This was discussed at the Seata monthly meeting. Seata-server is an independently deployed application. As a user-friendly way, skywalking plugin should be included in the distribution package of Seata-server.

When executing mvn clean install -DskipTests=true -P release-seata, copy dependency plugin can add the seata-server’s dependencies to the distribution folder. apm-Seata-Skywalking-plugin can also use the plugin add all the necessary plugins to distribution /plugin, and set 'javaagent:$path/plugin/skywalking-agent.jar -Dskywalking.agent.service_name=seata_tc' into startup.sh .

I think this function can be optimized in the next pr.

…apm-sw-0

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@zhaoyuguang
Copy link
Member Author

a little problem,the component information of Span shows as unknown.
image

I think this is caused by component metadata is not included in the latest release, but will be in next.

a little problem,the component information of Span shows as unknown.
image

I think this is caused by component metadata is not included in the latest release, but will be in next.

It is my fault. I have seen the above issue comment (#3652 (comment).

I think layer is DistributedTransaction - Seata is better

@slievrly
Copy link
Member

It looks very good.

Spring Cloud & Seata GlobalCommit case:
20210520194957
20210520200931

The following PR needs to be optimized here. 127.0.0.1:xxx is not an independent node, it always belongs to the biz / order / inventory / account remote service.

@slievrly
Copy link
Member

Spring Cloud & Seata GlobalRollback case:
20210520195448
20210520200328

@slievrly
Copy link
Member

In addition, too many SEATA/TC/HeartbeatMessage, it can be ignored, it just keep channel alive and connected.

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

@wu-sheng
Copy link
Member

In addition, too many SEATA/TC/HeartbeatMessage, it can be ignored, it just keep channel alive and connected.

In my mind, a health check should be a meter plugin, rather than tracing.

@slievrly
Copy link
Member

thanks @wu-sheng @zhaoyuguang @kezhenxu94 @skywalking

A great thing has been accomplished.

@wu-sheng
Copy link
Member

Look forward to your blog sharing how to use this to diagnose Seata.

@slievrly slievrly merged commit 55dd55d into apache:develop May 20, 2021
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.

None yet

6 participants