A cross-center call chain tracking method and device
By adding an identifier to the link ID, the problem of link data loss in cross-center call chain tracing is solved, enabling complete tracing of cross-center application call chains and ensuring the integrity of link data and the completion of call chains.
Patent Information
- Application Number
- CN202211661187.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-12-23
AI Technical Summary
After a large bank's core system was migrated from a foreign mainframe platform to a domestic distributed platform, there was a problem of missing span link data during the cross-regional and cross-center application call chain tracing process. This made it impossible to connect the data calls between the two centers, resulting in the inability to complete the entire application call chain.
By adding an identifier to the link ID, the link data in the monitoring data log generated by cross-center calls is ensured to be returned completely to the data center to which the application belongs. The link ID is modified using the identifier parameter in the configuration file to generate a second link ID with the data center identifier, and then sent to other data centers to receive and process the monitoring data logs to draw the call chain topology diagram.
It enables complete tracing of cross-center call chains, ensuring the integrity of link data and connecting data calls between two centers to complete the entire application call chain.
Smart Images

Figure CN116089208B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of call chain tracking, in particular to a cross-center call chain tracking method and device. BACKGROUND
[0002] At present, the migration of large bank core systems from foreign host platforms to domestic distributed platforms is the trend of the times. After migrating to a distributed system, due to the existence of cross-regional and cross-center registered applications, the flow process of transactions is complicated, and how to track these complex application call chains, timely handle problems therein, and optimize unreasonable resource allocation is the difficulty of all current distributed link tracking.
[0003] In the prior art, for cross-regional and cross-center applications, in the tracking process of the call chain, the span link data is lost, the data call of the two centers cannot be connected in series, and the entire application call chain cannot be completed. SUMMARY
[0004] Therefore, the embodiments of the present application provide a cross-center call chain tracking method and device to achieve the purpose of completing the entire application call chain.
[0005] To achieve the above purpose, the embodiments of the present application provide the following technical solutions:
[0006] The first aspect of the embodiments of the present application discloses a cross-center call chain tracking method, which comprises:
[0007] Each application is monitored based on the application monitoring integrated in the application service; each application is pre-configured with a configuration file for identifying the corresponding data center;
[0008] When a business call request initiated by any monitored application is output to a specified directory, the monitoring log information generated by the application carries a first link ID corresponding to the application; the first link ID is composed of a 32-bit integer;
[0009] Read the identification parameter in the configuration file corresponding to the application, modify the identification bit in the first link ID based on the identification parameter, and obtain a second link ID; the identification bit is the last bit of the 32-bit integer of the first link ID;
[0010] Send the business call request and the second link ID to the other data center;
[0011] receiving a monitoring data log generated and returned based on the second link ID during execution of the service call request by the other data center; the monitoring data log at least including: link data, type of request, start time, request time consumption, error information, and database link information;
[0012] based on the monitoring data log, calculating an index value of each application monitoring index, and drawing a call chain topology graph of the application.
[0013] Preferably, the reading of the identification parameter in the configuration file corresponding to the application, the modification of the identification bit in the first link ID based on the identification parameter, and the obtaining of the second link ID, include:
[0014] determining whether an identification parameter is configured in the configuration file corresponding to the application;
[0015] if yes, reading the identification parameter in the configuration file corresponding to the application, and modifying the last bit of the 32-bit integer of the first link ID to the identification parameter to obtain the second link ID;
[0016] if no, determining that the identification parameter is a null value, modifying the last bit of the 32-bit integer of the first link ID to 0 to obtain the second link ID, and processing the monitoring log information generated by the application by the computing engine of the current data center.
[0017] Preferably, after the calculation of the index value of each application monitoring index based on the monitoring data log, and the drawing of the call chain topology graph of the application, the method further includes:
[0018] associating the call chain topology graph with the second link ID;
[0019] storing the associated call chain topology graph and the second link ID;
[0020] when receiving a query instruction carrying the second link ID, querying and displaying the call chain topology graph based on the second link ID.
[0021] Preferably, the sending of the service call request and the second link ID to the other data center includes:
[0022] sending the service call request to the other data center;
[0023] sending the second link ID to the span node of the other data center;
[0024] Correspondingly, the receiving of the monitoring data log generated and returned based on the second link ID during execution of the service call request by the other data center includes:
[0025] The receiving unit is configured to receive monitoring data logs generated and returned based on the identification bit of the last bit of the second link ID in the span node during execution of the service call request by the other data center.
[0026] Preferably, the method further comprises:
[0027] The method further comprises:
[0028] The second aspect of the embodiment of the application discloses a cross-center call chain tracking device, which comprises:
[0029] The monitoring unit is configured to monitor each application based on application monitoring integrated in the application service.
[0030] The generating unit is configured to output monitoring log information generated by the application to a specified directory when a service call request initiated by any monitored application, wherein the monitoring log information carries a first link ID corresponding to the application; the first link ID is composed of a 32-bit integer.
[0031] The modifying unit is configured to read an identification parameter in a configuration file corresponding to the application, modify an identification bit in the first link ID based on the identification parameter, and obtain a second link ID; the identification bit is the last bit of the 32-bit integer of the first link ID.
[0032] The sending unit is configured to send the service call request and the second link ID to the other data center.
[0033] The receiving unit is configured to receive monitoring data logs generated and returned based on the second link ID during execution of the service call request by the other data center; the monitoring data logs at least include link data, a type of request, a start time, request time consumption, error information, and database link information.
[0034] The drawing unit is configured to calculate an index value of each application monitoring index based on the monitoring data logs, and draw a call chain topology graph of the application.
[0035] Preferably, the modifying unit comprises:
[0036] The judging subunit is configured to judge whether an identification parameter is configured in the configuration file corresponding to the application.
[0037] The modification sub-unit is configured to read the identification parameter in the configuration file corresponding to the application when the identification parameter is configured in the configuration file, modify the last bit of the 32-bit integer of the first link ID as the identification parameter to obtain the second link ID, determine that the identification parameter is a null value when the identification parameter is not configured in the configuration file, modify the last bit of the 32-bit integer of the first link ID as 0 to obtain the second link ID, and process the monitoring log information generated by the application by the computing engine of the current data center.
[0038] Preferably, the method further comprises:
[0039] The query unit is configured to associate the call chain topology graph with the second link ID after calculating the index value of each application monitoring index based on the monitoring data log and drawing the call chain topology graph of the application, store the associated call chain topology graph and the second link ID, and query and display the call chain topology graph based on the second link ID when a query instruction carrying the second link ID is received.
[0040] Preferably, the sending unit is specifically configured to:
[0041] send the business call request to the other data center, and send the second link ID to the span node of the other data center;
[0042] Correspondingly, the receiving unit is specifically configured to:
[0043] receive the monitoring data log returned based on the identification bit of the last bit of the second link ID in the span node in the process of executing the business call request by the other data center.
[0044] Preferably, the method further comprises:
[0045] The display unit is configured to display the index value of each application monitoring index and the call chain topology graph through a visual front-end interface.
[0046] Based on the cross-center call chain tracking method and device provided by the embodiment of the application, each application is monitored based on the application monitoring integrated in the application service; each application is pre-configured with a configuration file for identifying the data center to which the application belongs; when a business call request initiated by any monitored application is output to a specified directory, the monitoring log information generated by the application carries a first link ID corresponding to the application; the first link ID is composed of a 32-bit integer; the identification parameter in the configuration file corresponding to the application is read, and the identification bit in the first link ID is modified based on the identification parameter to obtain a second link ID; the identification bit is the last bit of the 32-bit integer of the first link ID; the business call request and the second link ID are sent to the other data center; the monitoring data log generated during the execution of the business call request by the other data center and returned based on the second link ID is received; the monitoring data log at least includes link data, type of request, start time, request time consumption, error information, and database link information; based on the monitoring data log, the index value of each application monitoring index is calculated, and the call chain topology diagram of the application is drawn. In the present scheme, by increasing the identification in the link ID, the link data in the monitoring data log generated by the cross-center call is ensured to be completely returned to the data center to which the application belongs, so as to connect the data calls of two centers in series to achieve the purpose of completing the entire application call chain. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only belong to the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on the provided drawings.
[0048] Figure 1 The flowchart of the cross-center call chain tracking method disclosed by the embodiment of the present application;
[0049] Figure 2 The flowchart of the cross-center call chain drawing and monitoring index calculation disclosed by the embodiment of the present application;
[0050] Figure 3 The application timing diagram of the cross-center call chain tracking disclosed by the embodiment of the present application;
[0051] Figure 4 The structure diagram of the cross-center call chain tracking device disclosed by the embodiment of the present application. DETAILED DESCRIPTION
[0052] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort are within the scope of the present application.
[0053] In the present application, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the sentence "including a" does not exclude the presence of other identical elements in the process, method, article or equipment including the element.
[0054] As known from the background, in the existing tracking process of cross-center call chain, the span link data is lost, the data calls of two centers cannot be concatenated, and the entire application call chain cannot be completed.
[0055] Therefore, the embodiments of the present application disclose a cross-center call chain tracking method and device. In the present scheme, the link data in the monitoring data log generated by cross-center call is ensured to be completely returned to the data center to which the application belongs by adding an identifier in the link ID, so as to concatenate the data calls of two centers, thereby achieving the purpose of completing the entire application call chain.
[0056] As shown in FIG. 1, it is a flowchart of a cross-center call chain tracking method disclosed by the embodiments of the present application. The method comprises the following steps: Figure 1
[0057] Step S101: Monitoring each application based on application monitoring integrated in application service.
[0058] In step S101, each application is pre-configured with a configuration file, and an identifier parameter in the configuration file is used to identify the data center to which the application belongs. If the identifier parameter is not configured, i.e., the identifier parameter is a null value, it is determined that the application identified by the identifier parameter does not perform cross-center business call.
[0059] It should be noted that 0 is a reserved number, so the identifier parameter is generally not configured as 0. The identifier parameter can be a number or a letter other than 0, which is not limited in the present application.
[0060] In the implementation process of step S101, the application monitoring javaagent integrated in the application service monitors each application.
[0061] Step S102: When the business call request initiated by any application is monitored, the monitoring log information generated by the application is output to the specified directory.
[0062] In step S102, the monitoring log information carries the first link ID of the corresponding application, wherein the first link ID is a globally unique global link trace TraceID, and the global link trace TraceID is composed of a 32-bit integer.
[0063] In the implementation process of step S102, when the business call request initiated by any application is monitored, the monitoring log information generated by the application is output to the specified directory by means of dot logging output.
[0064] The dot logging output refers to that the specified source address outputs customized information to the specified destination address. In the present scheme, the javaagent probe framework captures the monitoring log information generated by the application according to the specification, and then outputs it to the specified directory.
[0065] Step S103: Read the identification parameter in the configuration file corresponding to the application, modify the identification bit in the first link ID based on the identification parameter, and obtain the second link ID.
[0066] In step S103, the identification bit is the last bit of the 32-bit integer of the first link ID.
[0067] It should be noted that the second link ID is essentially a variant of the first link ID. As described above, the first link ID is a globally unique global link trace TraceID, and the second link ID is a variant of the global link trace TraceID, i.e., global link trace TraceID'.
[0068] In the implementation process of step S103, first, it is judged whether the identification parameter is configured in the configuration file corresponding to the application.
[0069] If the identification parameter is configured in the configuration file corresponding to the application, the identification parameter in the configuration file is read, and the last bit of the 32-bit integer of the first link ID is modified to the identification parameter to obtain the second link ID.
[0070] For example, assuming that the identification parameter in the configuration file is n, and the 32-bit integer of the first link ID is ****...***, the last bit of the 32-bit integer of the first link ID is modified to n to obtain the second link ID ****...**n.
[0071] If the identification parameter in the corresponding configuration file is not configured, it is determined that the identification parameter is a null value, the last bit of the 32-bit integer of the first link ID is modified to 0 to obtain the second link ID, and the monitoring log information generated by the application is processed by the computing engine of the current data center.
[0072] For example, assuming that the identification parameter in the configuration file is a null value and the 32-bit integer of the first link ID is ****...***, the last bit of the 32-bit integer of the first link ID is modified to 0 to obtain the second link ID ****...**0.
[0073] Step S104: Send the service call request and the second link ID to the other data center.
[0074] In step S104, the service call request and the second link ID are sent from the current data center to the other data center. The current data center and the other data center are two different data centers deployed in different places, for example, in a disaster recovery, a set of machine rooms will be established in different regions, and the A and A' mutual backup roles of the application system will be deployed.
[0075] In the process of implementing step S104, the service call request is sent from the current data center to the corresponding application service in the other data center, and the second link ID is sent from the current data center to the intermediate node, i.e. the span node, in the other data center.
[0076] Step S105: Receive the monitoring data log returned based on the second link ID in the process of executing the service call request by the other data center.
[0077] In step S105, the monitoring data log at least includes: link data, type of request, start time, request time consumption, error information and database link information.
[0078] The specific implementation process of the other data center executing the service call request and generating and returning the monitoring data log includes:
[0079] The intermediate node, i.e. the span node, in the other data center receives the second link ID, the corresponding application service in the other data center receives the service call request, the other data center executes the service call request, and in the execution process, adopts the dot output method to output the monitoring data log, and according to the last bit of the 32-bit integer of the second link ID in the intermediate node, returns the monitoring data log to the data center indicated by the identification.
[0080] The dot log output method refers to that the specified source address outputs customized information to the specified destination address.
[0081] Step S106: based on the monitoring data log, the index values of the various application monitoring indexes are calculated, and the call chain topology graph of the application is drawn.
[0082] In step S106, the various application monitoring indexes at least include: application average response time, application success rate, application error rate, application Apdex satisfaction, and application time consumption.
[0083] In the process of implementing step S106, the link data, type of request, start time, request time consumption, error information, and database link information in the monitoring data log are obtained by parsing the monitoring data log. The index values of the various application monitoring indexes are calculated based on the type of request, start time, request time consumption, error information, and database link information. The call chain topology graph of the application is drawn based on the link data.
[0084] In an embodiment, the call chain topology graph is associated with the second link ID, and the associated call chain topology graph and the second link ID are stored. When a query instruction carrying the second link ID is received, the call chain topology graph is queried and displayed based on the second link ID.
[0085] In an embodiment, after the index values of the various application monitoring indexes are calculated and the call chain topology graph of the application is drawn, the index values of the various application monitoring indexes and the call chain topology graph are displayed through a visual front-end interface.
[0086] In an embodiment, as shown in FIG. 1, a flowchart of a cross-center call chain drawing and monitoring index calculation disclosed in an embodiment of the present application is provided. Figure 2
[0087] Among them, the data center A includes the application A and the application B, and the data center B includes the application C and the application D.
[0088] It is assumed that the cross-center business calls between the data center A and the data center B are completed multiple times, and the monitoring data logs generated by the various applications are forwarded to the data center where the application initiating the business call belongs.
[0089] Specifically, the monitoring data in the data center A and the data center B are collected into Log-file files, the various monitoring data logs are collected from the Log-file files through a certain log specification, the various monitoring data logs are forwarded to the data processing center through the data gateway Anginx, the computing engine obtains the various monitoring data logs from the data processing center, and link calculation, topology drawing, time aggregation, and monitoring index calculation are performed, so as to finally obtain the index values of the various application monitoring indexes and the call chain topology graph. The index values of the various application monitoring indexes and the call chain topology graph are saved to the storage module.
[0090] Based on the cross-center call chain tracking method disclosed in the above embodiments of the application, a configuration file for identifying the data center to which an application belongs is configured in advance for the application requiring cross-center calling. When the application initiates a service calling request and generates a first link ID, the first link ID is modified according to the configuration file to obtain a second link ID with the identification of the data center to which the application belongs. The second link ID is transmitted to other data centers together with the service calling request for processing. According to the identification in the second link ID, the other data centers accurately return the monitoring data logs generated by processing the service calling request to the data center to which the application belongs, so that the data center draws a calling chain topology diagram according to the link data. In the present solution, the identification is added to the link ID, which ensures that the link data in the monitoring data logs generated by the cross-center calling is completely returned to the data center to which the application belongs, thereby connecting the data calling of the two centers to achieve the purpose of completing the entire application calling chain.
[0091] Based on the cross-center call chain tracking method disclosed in the above embodiments of the application, as shown in Figure 3 , an application timing diagram of the cross-center call chain tracking disclosed in the embodiments of the application is provided.
[0092] In the data center A, the application A is included, and in the data center B, the application B is included. The application A is configured with a configuration file for identifying that the application A belongs to the data center A.
[0093] Step S301: The application A is monitored based on the application monitoring integrated in the application A.
[0094] Step S302: When the service calling request initiated by the application A to the application B is monitored, the monitoring log information generated by the application A is output to a specified directory.
[0095] In step S302: The monitoring log information includes a first link ID composed of a 32-bit integer.
[0096] Step S303: The identification parameter in the configuration file corresponding to the application A is read, and the identification bit in the first link ID is modified based on the identification parameter to obtain a second link ID.
[0097] In step S303, the identification bit is the last bit in the 32-bit integer of the first link ID.
[0098] Step S304: The data center A sends the service calling request and the second link ID to the data center B.
[0099] Step S305: The data center B executes the service calling request to generate monitoring data logs.
[0100] In step S305: The monitoring data log includes at least: link data, request type, start time, request duration, error information, and database connection information.
[0101] Step S306: Data center B returns monitoring data logs to data center A based on the second link ID.
[0102] Step S307: Data center A calculates the indicator values of each application monitoring indicator based on the monitoring data logs and draws the application A call chain topology diagram.
[0103] Based on the cross-center call chain tracing method disclosed in the above embodiments of the present invention, a configuration file for identifying the data center to which the application belongs is pre-configured for applications that need cross-center calls. When the application initiates a cross-center business call request and generates a first link ID, the first link ID is modified according to the configuration file to obtain a second link ID with the identifier of the data center to which the application belongs. The second link ID is then transmitted to other data centers along with the business call request for processing. Other data centers accurately return the monitoring data logs generated by processing the business call request to the data center to which the application belongs based on the identifier in the second link ID. This allows the data center to draw a call chain topology diagram based on the link data. In this scheme, by adding an identifier to the link ID, it is ensured that the link data in the monitoring data logs generated by the cross-center call is completely returned to the data center to which the application belongs, thereby connecting the data calls of the two centers to complete the entire application call chain.
[0104] Based on the above embodiments of the present invention, a cross-center call chain tracing method is disclosed, such as... Figure 4 The diagram shown is a structural diagram of a cross-center call chain tracing device disclosed in an embodiment of the present invention. The device includes: a monitoring unit 401, a generation unit 402, a modification unit 403, a sending unit 404, a receiving unit 405, and a drawing unit 406.
[0105] Specifically, monitoring unit 401 is used to monitor various applications based on application monitoring integrated into the application service.
[0106] In practice, each application is monitored based on the application monitoring Javaagent integrated into the application service.
[0107] Each application has a pre-configured configuration file. The identifier parameter in the configuration file is used to identify the data center to which the application belongs. If the identifier parameter is not configured, that is, the identifier parameter is empty, it is determined that the application identified by the identifier parameter will not make cross-data center business calls.
[0108] It should be noted that 0 is a reserved number, so the identification parameter is generally not configured as 0, and the identification parameter can be a number or a letter other than 0, which is not limited in the present application.
[0109] The generating unit 402 is configured to output the monitoring log information generated by the application to a specified directory when any application initiates a business call request, and the monitoring log information carries the first link ID of the corresponding application.
[0110] The first link ID is composed of a 32-bit integer.
[0111] It should be noted that the first link ID does not appear repeatedly and is a globally unique link ID.
[0112] In a specific implementation, when any application initiates a business call request, the monitoring log information generated by the application is output to a specified directory in the form of a dot log.
[0113] The dot log output refers to that a specified source address outputs customized information to a specified destination address. In the present scheme, the monitoring log information generated by the application according to the specification is captured through the javaagent probe framework, and then output to a specified directory.
[0114] The modifying unit 403 is configured to read the identification parameter in the configuration file corresponding to the application, modify the identification bit in the first link ID based on the identification parameter, and obtain the second link ID.
[0115] The identification bit is the last bit of the 32-bit integer of the first link ID.
[0116] In an embodiment, the modifying unit 403 comprises:
[0117] The judging subunit is configured to judge whether the identification parameter is configured in the configuration file corresponding to the application.
[0118] The modifying subunit is configured to read the identification parameter in the configuration file corresponding to the application when the identification parameter is configured in the configuration file, modify the last bit of the 32-bit integer of the first link ID as the identification parameter to obtain the second link ID. When the identification parameter is not configured in the configuration file, it is determined that the identification parameter is a null value, the last bit of the 32-bit integer of the first link ID is modified as 0 to obtain the second link ID, and the monitoring log information generated by the application is processed by the computing engine of the current data center.
[0119] The sending unit 404 is configured to send the business call request and the second link ID to other data centers.
[0120] In a specific implementation, the business invocation request is sent to the other data center, and the second link ID is sent to the span node of the other data center.
[0121] It should be noted that the current data center and the other data center are two different data centers deployed in different places. For example, in a disaster recovery, a set of machine rooms are established in different regions, and the A and A' mutual backup roles of the application system are deployed.
[0122] The receiving unit 405 is configured to receive monitoring data logs generated during the execution of the business invocation request by the other data center and returned based on the second link ID. The monitoring data logs at least include link data, a type of request, a start time, a request time consumption, error information, and database link information.
[0123] In a specific implementation, the monitoring data logs generated during the execution of the business invocation request by the other data center and returned based on the identification bit of the last bit of the second link ID in the span node are received.
[0124] The drawing unit 406 is configured to calculate the index values of the application monitoring indexes based on the monitoring data logs, and draw the call chain topology graph of the application.
[0125] In an embodiment, the cross-center call chain tracking device further includes:
[0126] The query unit is configured to, after calculating the index values of the application monitoring indexes based on the monitoring data logs and drawing the call chain topology graph of the application, associate the call chain topology graph with the second link ID, store the associated call chain topology graph and the second link ID, and when receiving a query instruction carrying the second link ID, query and display the call chain topology graph based on the second link ID.
[0127] In an embodiment, the cross-center call chain tracking device further includes:
[0128] The display unit is configured to display the index values of the application monitoring indexes and the call chain topology graph through a visual front-end interface.
[0129] Based on the cross-center call chain tracking device disclosed in the above embodiment of the application, a configuration file for identifying the data center to which the application belongs is configured in advance for the application requiring cross-center calling. When the application initiates a cross-center service call request and generates a first link ID, the first link ID is modified according to the configuration file to obtain a second link ID with the identification of the data center to which the application belongs. The second link ID is transmitted to other data centers together with the service call request for processing. According to the identification in the second link ID, the other data centers accurately return the monitoring data logs generated by processing the service call request to the data center to which the application belongs, so that the data center draws a call chain topology graph according to the link data. In the present scheme, the link data in the monitoring data logs generated by the cross-center call is completely returned to the data center to which the application belongs by adding the identification in the link ID, thereby connecting the data calls of the two centers to achieve the purpose of completing the entire application call chain.
[0130] Each embodiment in the present specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other. Each embodiment mainly describes the difference from other embodiments. Especially, the system or system embodiment is basically similar to the method embodiment, so the description is relatively simple, and the related parts can be referred to the part of the method embodiment. The above-described system and system embodiment are only illustrative, and the units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0131] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical scheme. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0132] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the appended claims are intended to cover all such modifications that do not depart from the true spirit and scope of the application. Therefore, the application is not limited to the embodiments shown but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A cross-center call chain tracing method, characterized in that, The method includes: Each application is monitored based on application monitoring integrated into the application service; each application is pre-configured with a configuration file to identify its data center. When any application initiates a business call request, the monitoring log information generated by the application is output to a specified directory. The monitoring log information carries the first link ID corresponding to the application; the first link ID is composed of a 32-bit integer. Read the identifier parameter in the configuration file corresponding to the application, and modify the identifier bit in the first link ID based on the identifier parameter to obtain the second link ID; the identifier bit is the last bit of the 32-bit integer of the first link ID; Send the service call request and the second link ID to other data centers; During the process of receiving the service call request from the other data center, a monitoring data log is generated and returned based on the second link ID; the monitoring data log includes at least: link data, request type, start time, request time, error information and database connection information; Based on the monitoring data logs, the indicator values of each application monitoring indicator are calculated, and the call chain topology diagram of the application is drawn.
2. The method according to claim 1, characterized in that, The step of reading the identifier parameter from the configuration file corresponding to the application, and modifying the identifier bit in the first link ID based on the identifier parameter to obtain the second link ID includes: Determine whether an identifier parameter is configured in the configuration file corresponding to the application; If so, read the identifier parameter in the configuration file corresponding to the application, and modify the last bit of the 32-bit integer of the first link ID to the identifier parameter to obtain the second link ID; If not, if the identifier parameter is determined to be null, the last bit of the 32-bit integer of the first link ID is modified to 0 to obtain the second link ID, and the monitoring log information generated by the application is processed by the computing engine of the current data center.
3. The method according to claim 1, characterized in that, After calculating the metric values of each application monitoring indicator based on the monitoring data logs and drawing the call chain topology diagram of the application, the method further includes: Associate the call chain topology graph with the second link ID; Store the associated call chain topology and the second link ID; When a query instruction carrying the second link ID is received, the call chain topology diagram is queried and displayed based on the second link ID.
4. The method according to claim 1, characterized in that, Sending the service call request and the second link ID to the other data center includes: Send the service call request to the other data center; Send the second link ID to the span node of the other data center; Accordingly, the monitoring data log generated and returned based on the second link ID during the process of receiving the service call request from the other data center includes: During the process of receiving the service call request from other data centers, a monitoring data log is generated and returned based on the last bit of the identifier of the second link ID in the span node.
5. The method according to any one of claims 1 to 4, characterized in that, Also includes: The visualization front-end interface displays the metric values of each application monitoring indicator and the call chain topology diagram.
6. A cross-center call chain tracing device, characterized in that, include: The monitoring unit is used to monitor various applications based on application monitoring integrated into the application service; The generation unit is used to output the monitoring log information generated by any application to a specified directory when a business call request is initiated by any monitored application. The monitoring log information carries the first link ID corresponding to the application. The first link ID consists of a 32-bit integer; The modification unit is used to read the identifier parameter in the configuration file corresponding to the application, and modify the identifier bit in the first link ID based on the identifier parameter to obtain the second link ID; The identifier bit is the last bit of the 32-bit integer of the first link ID; A sending unit is used to send the service call request and the second link ID to other data centers; The receiving unit is used to receive monitoring data logs generated and returned based on the second link ID during the execution of the service call request by the other data center; The monitoring data log includes at least: link data, request type, start time, request duration, error information, and database connection information; The drawing unit is used to calculate the indicator values of each application monitoring indicator based on the monitoring data logs, and draw the call chain topology diagram of the application.
7. The apparatus according to claim 6, characterized in that, The modification unit includes: The judgment subunit is used to determine whether the identification parameter is configured in the configuration file corresponding to the application; The modification subunit is used to read the identifier parameter in the configuration file corresponding to the application when the identifier parameter is configured in the configuration file, and modify the last bit of the 32-bit integer of the first link ID to the identifier parameter to obtain the second link ID; when the identifier parameter is not configured in the configuration file, it is determined that the identifier parameter is empty, and the last bit of the 32-bit integer of the first link ID is modified to 0 to obtain the second link ID, and the monitoring log information generated by the application is processed by the computing engine of the current data center.
8. The apparatus according to claim 6, characterized in that, Also includes: The query unit is used to calculate the indicator values of each application monitoring indicator based on the monitoring data logs, draw the call chain topology diagram of the application, and then associate the call chain topology diagram with the second link ID. Store the associated call chain topology and the second link ID; When a query instruction carrying the second link ID is received, the call chain topology diagram is queried and displayed based on the second link ID.
9. The apparatus according to claim 6, characterized in that, The sending unit is specifically used for: The service call request is sent to the other data center; the second link ID is sent to the span node of the other data center; Accordingly, the receiving unit is specifically used for: During the process of receiving the service call request from other data centers, a monitoring data log is generated and returned based on the last bit of the identifier of the second link ID in the span node.
10. The apparatus according to any one of claims 6 to 9, characterized in that, Also includes: The display unit is used to display the indicator values of various application monitoring metrics and the call chain topology diagram through a visual front-end interface.
Citation Information
Patent Citations
Full-link monitoring method, device and system based on block chain
CN110457190A
Method and device for tracking calling link in distributed system
CN110708212A