Zhao Yuguang, Seata Contributor, SkyWalking PMC
Background before order
As can be seen from the title of the article, it was at this time that the two ecological integration of Seata and SkyWalking achieved phased results. Below unifies the article content, gives you slowly way.
The reason for this is that Seata and SkyWalking are the leaders in distributed transactions and one-stop APM, respectively, as can be seen from the Github Star rankings. So as early as 2019, Seata users started asking for SkyWalking observations.
After Seata is integrated into SkyWalking monitoring, APM feature is introduced. When locating problems of Seata distributed transactions, users can analyze problems from multiple dimensions, such as distributed link, machine index and log content, so as to improve problem locating efficiency.
Based on this appeal, students interested in the two communities started preliminary discussion and practice. However, since there was no transport-oriented message Header similar to HTTP Header in Seata’s transport protocol at that time, the first version of Seata implemented monitoring observation, but compatibility was not friendly. This is obviously lacking in monitoring solutions to distributed transactions. So we started a second round of discussions and concluded that compatibility preconditions are necessary, so Seata is RoadMap for transport protocol upgrades. The SkyWalking community has put the matter on hold.
More than a year later, the Seata community has completed the transport protocol upgrade in the process, so we restart the matter.
What do users get when Seata connects to SkyWalking
The background has been described. Due to a long time, you may not be very clear about the effect brought by the integration of the two ecosystems. Here, based on my personal understanding, I will introduce the benefits brought to users by the integration of the two ecosystems:
- Seata performance can be better observed:
I see a lot of Seata sharing where users ask questions about Seata’s performance consumption data. Because the performance consumption of distributed transactions is very much related to the scene, SkyWalking makes it easier for users to observe their own scene and give their own answers.
- The distributed transaction execution process has traces
In AT mode, Seata passes the global transaction XID through the transport-oriented message header. After the global transaction is completed, each execution in the DB is cleaned up. This is very unfriendly to trace back to the execution. This significantly increases the space of the database tables associated with distributed transactions and incurs unnecessary performance costs. So when the two ecosystems merge, SkyWalking’s associated database monitoring can record huge amounts of data about these implementations.
- Localization problem improvement
XID is printed in the log and TraceId is printed at the same time. When problems occur and you want to trace back the global link associated with XID, you can enter TraceId in the display end of SkyWalking and integrate SkyWalking through Seata overall monitoring. Not only has the whole link domain monitoring, but also in the dashboard, topology, online profiling and alarm are monitored.
- Getting started with Seata increases one dimension
Distributed transactions get a lot of hype, but the only thing that really hits the market is Seata, so there is no open source learning template for Seata, so there are few quick guides to get you started. Moreover, Seata has 3 roles and 4 classic modes, which can be combined in a variety of ways. In summary, it can not help but make users in a fog. After the integration of the two ecology, users can clearly know the execution process of Seata from God (monitoring), and then dialysis working principle.
2. Typical AT mode monitoring scenarios
The following is an official AT Demo to show the APM features.
The official description of the ToC transaction scenario
- The user requests the transaction service
- Trading services lock inventory
- The transaction service creates bills
- The billing service makes deductions
When Seata merged with SkyWalking, the scene was restored
Description of global transaction normal link
Description of a link with a global transaction exception
The user manual
website
SkyWalking APM: seata. IO/useful – cn/docs /…
Commonly used links
Seata: github.com/seata/seata Samples: github.com/seata/seata… Release: github.com/seata/seata… Liverpoolfc.tv: seata. IO
contribute
You are welcome to submit your Seata practice articles to [email protected]