A service system exception monitoring method and device

By deploying and publishing scripts in the business system, the running status of business processes is automatically determined and the agent tracking package is loaded, which solves the problem of complex and long cycle of tracking agent work in the existing technology, and realizes fast and accurate anomaly monitoring and root cause location.

CN113094238BActive Publication Date: 2026-11-20WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110448355.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-25
Publication Date
2026-11-20
Estimated Expiration
2041-04-25

AI Technical Summary

Technical Problem

The existing APM system is complex and time-consuming to embed Agents in business systems, which is prone to errors and makes it difficult to quickly locate the root cause of anomalies.

Method used

By deploying and publishing scripts in the business system, the running status of business processes can be automatically determined and the proxy event tracking package can be loaded, thereby achieving automated event tracking, reducing the work cycle and difficulty, improving the accuracy of event tracking, and quickly locating the root cause of anomalies.

Benefits of technology

It has enabled automated data entry for monitoring anomalies in business systems, reducing the workload and difficulty, and improving the accuracy of data entry and the speed and accuracy of anomaly root cause location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113094238B_ABST
    Figure CN113094238B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of service system exception monitoring method and device, and the service system is deployed with release script, and the method comprises: the running state of each business process in the service system is determined by the release script;For any business process, when the running state of the business process meets the set condition, the agent point-in-time program package of the service system is obtained from distribution server by the release script;The agent point-in-time program package is loaded to the business process by the release script to carry out the exception monitoring of service system.The above-mentioned method can realize automatic point-in-time Agent, reduce the difficulty and work cycle of point-in-time, improve the accuracy of point-in-time, and can quickly locate the root cause of exception.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automated operation and maintenance technology in financial technology (Fintech), and in particular to a method and device for monitoring anomalies in business systems. Background Technology

[0002] APM (Application Performance Management) is a branch of IT operations management. It provides a systematic solution for real-time monitoring of enterprise systems to manage application performance and faults. For example, based on the operational information of business systems obtained through monitoring, it enables the monitoring and optimization of IT application performance and user experience for critical business operations, aiming to improve the reliability and quality of enterprise IT applications, ensure good service to users, and reduce the total cost of ownership (TCO).

[0003] Existing APM systems such as Skywalking (an open-source platform for collecting, analyzing, aggregating, and visualizing observable data from different services and local infrastructure services) and PinPoint (a distributed transaction tracing system platform) all provide event tracking agents for business systems to integrate and obtain operational information. While these methods can accurately obtain operational information to optimize business systems, they suffer from several drawbacks. Since business systems often contain multiple subsystems with varying startup parameters for their agent scripts, each subsystem's development team must execute the event tracking agent process separately based on its specific parameters. This process is complex, time-consuming, and prone to errors, reducing accuracy. Furthermore, these methods cannot quickly pinpoint the root cause of anomalies based on operational information from the business system. Summary of the Invention

[0004] This invention provides a method and apparatus for monitoring anomalies in a business system, which can automate the placement of event tracking agents, reduce the work cycle and difficulty of event tracking, improve the accuracy of event tracking, and quickly locate the root cause of anomalies.

[0005] In a first aspect, embodiments of the present invention provide a method for monitoring anomalies in a business system, wherein the business system has a deployment script, and the method includes:

[0006] The running status of each business process in the business system is determined by the release script;

[0007] For any business process, when the publishing script determines that the running status of the business process meets the set conditions, the proxy tracking package of the business system is obtained from the distribution server; the publishing script loads the proxy tracking package into the business process for abnormal monitoring of the business system.

[0008] In the above method, the distribution server deploys the release script in the business system, enabling the release script to collect the running status of each business process in the business system, further determine the corresponding proxy tracking package for each business process, and automatically load the proxy tracking package from the distribution server into the business process to complete the tracking agent. Compared with the existing technology, which relies on the person in charge of each subsystem to perform tracking in the subsystem, i.e., developers modify the relevant parameters of the proxy tracking package containing the startup script parameters according to the relevant parameters of the subsystem to ensure that the tracking agent can run normally, this application automatically obtains the corresponding proxy tracking package according to the running status of the business process through the release script, and further directly performs tracking on the business process, realizing automated tracking; reducing the tracking work cycle and difficulty, and improving tracking accuracy.

[0009] Optionally, obtaining the proxy event tracking package of the business system from the distribution server includes: determining the library package of the business system subsystem corresponding to the business process through the release script; if the library package includes a preset common class, then obtaining a first proxy event tracking package from the distribution server; the first proxy event tracking package does not contain the preset common class but contains the calling logic of the preset common class; if the library package does not contain the preset common class, then obtaining a second proxy event tracking package from the distribution server; the second proxy event tracking package contains the preset common class and contains the calling logic of the preset common class.

[0010] In the above method, the business system can contain at least one subsystem. Each subsystem can contain a business process for loading and running the proxy event tracking package. Alternatively, some subsystems may not contain a business process for loading and running the proxy event tracking package. This business process can be configured as needed, and no specific limitation is made here. Therefore, it is possible to determine whether the subsystem library package corresponding to the business process contains a preset common class. If it does, the first proxy event tracking package is obtained from the distribution server; if it does not, the second proxy event tracking package is obtained from the distribution server. Thus, the deployment script can determine whether to obtain the first proxy event tracking package - a simplified proxy event tracking package or the second proxy event tracking package - a complete proxy event tracking package based on the classes contained in the subsystem library package corresponding to the business process. The simplified proxy event tracking package does not contain the preset common class but contains the calling logic of the preset common class, while the complete proxy event tracking package contains both the preset common class and the calling logic of the preset common class. Compared to existing technologies where all business processes in a business system load the complete proxy tracking package, this application allows loading a first proxy tracking package that does not contain a pre-defined common class when the subsystem library package of a business process contains such a class. This prevents the pre-defined common class from being repeatedly loaded, occupying metadata space and affecting the performance of the business system. Furthermore, in existing technologies, if the pre-defined common class in the complete proxy tracking package and the pre-defined common class in the subsystem library package are of the same type but different versions, the pre-defined common class in the proxy tracking package needs to be converted to prevent version incompatibility. However, this application allows loading a first proxy tracking package that does not contain a pre-defined common class when the subsystem library package of a business process contains such a class. This allows the subsystem and business process to directly share the pre-defined common class, eliminating version incompatibility issues and the need to convert the pre-defined common class, thus saving tracking time.

[0011] Optionally, determining that the running status of the business process meets the set conditions through the release script includes: determining through the release script that the development tool version used by the business process is greater than or equal to a preset development tool version, the remaining metadata space of the business process is greater than a preset metadata space, and the remaining heap space of the business system is greater than a preset heap space.

[0012] In the above method, the deployment script ensures that the development tool version used by the business process is greater than or equal to the preset development tool version, thus guaranteeing that the business process has sufficient capacity to run the proxy tracking package. The deployment script also ensures that the remaining metadata space and remaining heap space of the business process are greater than the preset metadata space and preset heap space, thus guaranteeing that the business process has sufficient space to load and run the proxy tracking package. This improves the reliability and accuracy of the automated loading of the proxy tracking package, and further enhances the reliability and accuracy of anomaly monitoring in the business system.

[0013] Optionally, loading the proxy tracking package into the business process via the release script includes: obtaining the business process via a first preset statement in the proxy tracking package, and loading the proxy tracking package into the business process via a second preset statement in the proxy tracking package.

[0014] In the above method, after the script retrieves the proxy event tracking package from the distribution server, the first preset statement in the proxy event tracking package can automatically obtain the business process, and the second preset statement loads the proxy event tracking package into the business process. Thus, loading the proxy event tracking package at the process level is significantly more efficient than existing technologies that load it at the subsystem level, requiring modification of the proxy event tracking package parameters based on subsystem parameters. This application can directly load the proxy event tracking package into the business process at the process level without manually analyzing and modifying the proxy event tracking package parameters, achieving automated proxy event tracking package loading and reducing the event tracking cycle and cost.

[0015] Optionally, after loading the proxy event tracking package into the business process via the release script, the method further includes: starting the proxy event tracking program corresponding to the proxy event tracking package; and downloading the preset common class to the preset root loader via the proxy event tracking program.

[0016] In the above method, a preset common class is downloaded to the root loader, such as the Bootstrap root loader, so that the proxy tracking package and the corresponding subsystem implementation can share the preset common class.

[0017] Optionally, after loading the proxy event tracking package into the business process via the release script, the method further includes: adding the tracking information of the tracked process to the context of the corresponding thread via the proxy event tracking program corresponding to the proxy event tracking package; the tracking information includes a tracking identifier; if the tracked process encounters an exception, the proxy event tracking program intercepts the exception method, determines the exception object corresponding to the exception method, and the exception object includes exception information and the thread context.

[0018] In the above method, the proxy event tracking program adds the tracing information of the process being tracked to the thread's context; it then intercepts the exception method that causes an exception in that process and constructs an exception object containing exception information and the thread's context. In other words, the proxy event tracking program can construct an exception object for an abnormal process. Thus, if an exception occurs in the business system, exception-related information about the abnormal method can be quickly obtained from the exception object, improving the speed and accuracy of locating the root cause of the exception. Furthermore, since the exception object contains the thread's context, and the thread's context tracing information includes tracing identifiers, the tracing identifiers in the exception object can be correlated with the tracing log (generated by the proxy event tracking program) containing those identifiers to further obtain relevant information from the tracing log, providing developers with sufficient information for exception analysis.

[0019] Optionally, after loading the proxy tracking package into the business process via the release script, the method further includes: generating a tracking log for the business system via the proxy tracking program; the tracking log includes a tracking identifier, a subsystem identifier, an IP address, and a tracking time; and generating a log file for the business system via a log component; the log file includes a subsystem identifier, an IP address, and a log time.

[0020] In the above method, the inclusion of a tracking identifier in the tracking log establishes a correlation between the anomaly object and the tracking log; the inclusion of subsystem identifiers, IP addresses, and time information in both the tracking log and the log file establishes a correlation between the tracking log and the log file. This ultimately creates a correlation between the anomaly object and the tracking log, and between the tracking log and the log file. This facilitates the subsequent retrieval of anomaly-related data based on this correlation, improving the convenience of anomaly analysis.

[0021] Optionally, it further includes: determining the tracking identifier based on the abnormal object; and determining the tracking log based on the tracking identifier;

[0022] Based on the tracking logs, determine the identifier, IP address, and tracking time of the subsystem where the anomaly occurred;

[0023] Based on the subsystem identifier, IP address, and tracing time, the exception log and context log of the occurrence are determined from the log file.

[0024] The above method ensures that the exception object and the tracing log contain the same tracing identifier, and that the log file and the tracing log contain the same subsystem identifier, IP address, and tracing time. This establishes a correlation between the exception object, the tracing log, and the log file. When developers identify an exception object and need to obtain further information to analyze and locate the root cause, they can retrieve the tracing log based on the exception object's tracing identifier, and then retrieve the log file based on the subsystem identifier, IP address, and tracing time in the tracing log. This reduces the workload and time required for developers' operation and maintenance, and improves the accuracy of exception root cause location.

[0025] Secondly, embodiments of the present invention provide a business system anomaly monitoring device, wherein the business system has a distribution script deployed, and the device includes:

[0026] The determination module is used to determine the running status of each business process in the business system through the release script;

[0027] The processing module is used to, for any business process, when the running status of the business process meets the set conditions determined by the release script, obtain the proxy tracking package of the business system from the distribution server; and load the proxy tracking package into the business process through the release script to perform abnormal monitoring of the business system.

[0028] Thirdly, embodiments of this application also provide a computing device, including: a memory for storing a program; and a processor for calling the program stored in the memory and executing the method described in various possible designs of the first aspect according to the obtained program.

[0029] Fourthly, embodiments of this application also provide a computer-readable non-volatile storage medium including a computer-readable program that, when read and executed by a computer, causes the computer to perform the method described in various possible designs of the first aspect.

[0030] These or other implementations of this application will become clearer and easier to understand in the following description of the embodiments. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram of an architecture for monitoring anomalies in a business system, provided by an embodiment of the present invention.

[0033] Figure 2 A schematic diagram of the architecture of a business system provided in an embodiment of the present invention;

[0034] Figure 3 A flowchart illustrating a business system anomaly monitoring method provided in an embodiment of the present invention;

[0035] Figure 4 A flowchart illustrating a business system anomaly monitoring method provided in an embodiment of the present invention;

[0036] Figure 5 This is a schematic diagram of a business system anomaly monitoring device provided in an embodiment of the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0038] Figure 1 This invention provides a system architecture for monitoring anomalies in a business system. The distribution server 102 deploys a release script, a first agent tracking package, and a second agent tracking package; alternatively, it can be a distribution server cluster, such as... Figure 1 The distribution server cluster 101 contains distribution servers that deploy release scripts, first agent tracking packages, and second agent tracking packages. This system architecture can be configured as a distribution server cluster or distribution servers as needed, without specific limitations. The business server cluster 103 can contain multiple business server clusters 104, and each business server cluster 104 can contain multiple business servers 105. This can be configured as needed, without specific limitations. For example, business server cluster 103 can contain multiple business systems, each corresponding to a different business server cluster; or, business server cluster 103 can contain business server clusters for different operational phases of the same business system, such as business server clusters for the development phase, business server clusters for the testing phase, business server clusters for the production phase, etc. The business server clusters can be configured based on the function, operational status, and number of business systems, without specific limitations. Similarly, the collection server can be a collection server cluster 106 or a collection server 107; the log server can be a log server cluster 108 or a log server 109; this can be configured according to requirements.

[0039] Figure 2 This is a schematic diagram of the architecture of a business system provided in an embodiment of the present invention. The business system may include multiple subsystems, and each subsystem may correspond to a business process for loading the proxy tracking package. There may also be subsystems without a business process for loading the proxy tracking package. This can be set as needed and is not specifically limited.

[0040] based on Figure 1 and Figure 2The architecture described here takes the distribution server 102, business server cluster 104, collection server 107, and log server 109 as the main components of the system architecture. It also describes an example where the business system contains two subsystems—subsystem 1 and subsystem 2—and an anomaly occurs in the request between subsystem 1 and subsystem 2. After receiving the distribution instruction, the distribution server 102 distributes the publishing script to the business system of the business server cluster 104. The deployment script checks the development tool version, remaining metadata space, and remaining heap space of the business processes in subsystems 1 and 2 within the business system. Specifically, it determines whether the running status of the business processes meets the set conditions. If so, it retrieves whether the library packages of subsystems 1 and 2 contain preset common classes. If subsystem 1's library package contains preset common classes and subsystem 2's library package does not, the deployment script retrieves the first proxy tracking package and the second proxy tracking package from the distribution server for subsystems 1 and 2 respectively. It then loads the first and second proxy tracking packages into subsystems 1 and 2 respectively. When subsystem 1 sends a request to subsystem 2, the first proxy tracking program in subsystem 1 generates a trace for that request and corresponding trace information (including a trace identifier). Subsystem 1 then sends this trace identifier to subsystem 2 through the request. The second proxy tracking program in subsystem 2 generates a trace with the same tracking identifier as the trace in subsystem 1 for the request, tracks the process handling the request, and generates corresponding tracking information. This tracking information is added to the thread's context. If an exception occurs in the process, the second proxy tracking program intercepts the exception method, constructs an exception object based on the exception information of the exception method and the thread's context information, and reports the exception object to the collection server 107. The first and second proxy tracking programs respectively send the generated tracking logs to the collection server 107. Subsystem 1 and subsystem 2 respectively send the log files generated by their log components to the log server 109, which then reports the log files to the collection server 107. Thus, the collection server 107 contains exception objects, tracking logs, and log files. The exception objects are associated with the tracking logs through tracking identifiers, and the tracking logs are associated with the log files through subsystem identifiers, IP addresses, and log timestamps. This allows developers to quickly obtain exception-related information based on the exception objects, accelerating the root cause localization of exceptions.

[0041] Based on the above system architecture, this application provides a method for monitoring anomalies in a business system. The business system deploys a release script, such as... Figure 3 As shown, it includes:

[0042] Step 301: Determine the running status of each business process in the business system through the release script;

[0043] Here, the business process can be the process used to load and run the proxy event tracking program.

[0044] Step 302: For any business process, when the running status of the business process meets the set conditions as determined by the release script, obtain the proxy tracking package of the business process from the distribution server; load the proxy tracking package into the business process through the release script to perform abnormal monitoring of the business system.

[0045] In the above method, the distribution server deploys the release script in the business system, enabling the release script to collect the running status of each business process in the business system, further determine the corresponding proxy tracking package for each business process, and automatically load the proxy tracking package from the distribution server into the business process to complete the tracking agent. Compared with the existing technology, which relies on the person in charge of each subsystem to perform tracking in the subsystem, i.e., developers modify the relevant parameters of the proxy tracking package containing the startup script parameters according to the relevant parameters of the subsystem to ensure that the tracking agent can run normally, this application automatically obtains the corresponding proxy tracking package according to the running status of the business process through the release script, and further directly performs tracking on the business process, realizing automated tracking; reducing the tracking work cycle and difficulty, and improving tracking accuracy.

[0046] This application provides a method for obtaining proxy event tracking packages. The method involves obtaining the proxy event tracking package for a business process from a distribution server, including: determining the library package of the business system subsystem corresponding to the business process through a release script; if the library package includes a preset common class, obtaining a first proxy event tracking package from the distribution server; the first proxy event tracking package does not contain the preset common class but contains the calling logic of the preset common class; if the library package does not contain the preset common class, obtaining a second proxy event tracking package from the distribution server; the second proxy event tracking package contains the preset common class and the calling logic of the preset common class. In other words, the release script can record whether each type of proxy event tracking package in the distribution server contains a preset common class and the type of the preset common class, thereby obtaining the preset common class information in the subsystem library package corresponding to the business process, and then customizing the loading of the corresponding first or second proxy event tracking program for each business process. This involves comprehensively evaluating factors such as the complexity of developers creating proxy tracking packages, the logical complexity of deployment scripts and related programs, and the size of commonly used packages in the business system (e.g., Netty for network communication, Jackson for serialization and deserialization), to determine preset common classes. Developers can then prioritize classes with higher memory footprints or larger memory usage when selecting preset common classes. This ensures that the business system avoids repeatedly loading large classes, effectively saving memory resources and improving system performance, while also reducing the workload for developers and the logical complexity of deployment scripts and related programs.

[0047] For example, the distribution server contains a first agent tracking package - a simplified JAR file, which includes: class A + class A calling logic, class B + class B calling logic, and class C calling logic. The distribution server also contains a second agent tracking package - a full version JAR file, which includes: class A + class A calling logic, class B + class B calling logic, and class C + class C calling logic. That is, class C is a pre-defined shared class.

[0048] The deployment script contains pre-defined common class information for both the full and simplified JAR packages. For example, the full JAR package contains class C, while the simplified JAR package does not. The deployment script then checks whether class C exists in multiple JAR packages within each subsystem of the business system. Here, the business system can expose itself to the deployment script via the MSS-AGENTMGR (proxy database) HTTP interface, allowing the deployment script to check if the pre-defined common classes are present in the classpath. If a subsystem contains class C, its business system loads the simplified JAR package; otherwise, it downloads the full JAR package. The deployment script can obtain the proxy tracking package to the local machine of the business system using wget (a file download tool) and start the proxy tracking program via PreMain. In one possible approach, a business process of a subsystem can load one proxy tracking package. In another possible approach, the simplified JAR package, at runtime, searches for class C in each JAR package of the corresponding subsystem and then calls that class C, thus eliminating the need to record the class C call path.

[0049] This application provides a set condition for determining whether the running status of the business process meets the set condition through the release script. This includes: determining through the release script that the development tool version used by the business process is greater than or equal to a preset development tool version, the remaining metadata space of the business process is greater than a preset metadata space, and the remaining heap space of the business system is greater than a preset heap space. In other words, to ensure that the business process can accurately support the operation of the proxy tracking program, it is restricted that the development tool version used by the business process is greater than or equal to a preset development tool version before it is eligible to load the proxy tracking program package. Furthermore, it is also necessary to ensure that the remaining metadata space and heap space of the business process are sufficient for the normal operation of the proxy tracking program; therefore, it is restricted that the development tool version used by the business process is greater than or equal to a preset development tool version, and the remaining metadata space and heap space are greater than the preset metadata space and the preset heap space before the proxy tracking program package can be loaded. This ensures the reliability and accuracy of the proxy tracking program package loading, as well as the runnability of the proxy tracking program.

[0050] This application provides a method for loading a proxy event tracking package. The method loads the proxy event tracking package into a business process via a deployment script. The method includes: obtaining the business process using a first preset statement in the proxy event tracking package, and loading the proxy event tracking package into the business process using a second preset statement in the proxy event tracking package. In one example, after the deployment script obtains the proxy event tracking package from the distribution server, the proxy event tracking program obtains the business process using `VirtualMachinevm = VirtualMachine.attach(pid)`, and loads the proxy event tracking package into the business process using `VirtualMachine.loadAgent()`. In other words, compared to existing technologies where developers or responsible personnel of each subsystem need to manually load the proxy event tracking package by modifying relevant parameters of the proxy event tracking package at the subsystem level, this application allows the proxy event tracking package to contain relevant program statements that can be loaded at the process level, achieving automated deployment of the proxy event tracking package, shortening the event tracking cycle, and reducing event tracking workload and costs.

[0051] This application provides a method for running a proxy event tracking program. After loading the proxy event tracking program package into the business process through the deployment script, the method further includes: starting the proxy event tracking program corresponding to the proxy event tracking program package; and downloading the preset common class to a preset root loader through the proxy event tracking program. In other words, because existing technologies require downloading classes identical to those in the proxy event tracking program package and the library package of the business system subsystem, two identical classes may exist simultaneously in the business system subsystem, leading to resource waste; especially when the class occupies a large amount of memory, it affects the performance of the business system subsystem. Therefore, this application can set identical classes in the proxy event tracking program package and the library package of the business system subsystem as preset common classes. If the deployment script determines that the business system already contains the preset common class, a proxy event tracking program package that does not contain the preset common class can be downloaded. To ensure that the proxy event tracking package and the business system subsystem can share the preset common class, the proxy event tracking program within the proxy event tracking package includes a scanning program. When the business system subsystem loads the proxy event tracking package, this scanning program runs to scan the library packages of the business system subsystem, obtains the preset common class, and loads it into the root loader. This allows both the proxy event tracking program and the business system subsystem to simultaneously call the preset common class from the root loader. This prevents the proxy event tracking program from being unable to call the preset common class if it is not loaded into the root loader, which could lead to the proxy event tracking program malfunctioning. In other words, to improve the performance of the business system, when the deployment script loads the proxy event tracking package locally, the internal program of the proxy event tracking program first loads the preset common class into the Bootstrap root loader for global sharing by both the proxy event tracking program and the business system.

[0052] This application provides a method for constructing an exception object. After loading the proxy tracking package into the business process through the release script, the method further includes: adding the tracking information of the process to be tracked to the context of the corresponding thread through the proxy tracking program corresponding to the proxy tracking package; the tracking information includes a tracking identifier; if the tracked process encounters an exception, the proxy tracking program intercepts the exception method and determines the exception object corresponding to the exception method, the exception object including exception information and the thread context. In other words, when a process is generated in a subsystem, the proxy tracking program generates a tracking for that process and corresponding tracking information; this tracking information is added to the thread context. For example, when a request is generated in the subsystem, a process is generated for that request, and the proxy tracking program tracks that process to determine the generation time of the tracked process, the subsystem identifier of the tracked process, the ID of the tracked process, the corresponding thread ID, and related information about the operation of the tracked process. The tracking information can be set as needed, and the specific tracking content is not limited. When an exception occurs in the process, the proxy event tracking program intercepts the exception method, determines the method identifier that caused the exception, the exception type of the exception method, and other exception information, and constructs an exception object based on the exception information and the thread context. This allows developers to quickly obtain the exception information of the exception method and the thread context, accelerating the root cause location of the exception. In addition, the proxy event tracking program can also generate trace logs containing tracing information and information about remote calls between systems.

[0053] This application provides a method for obtaining anomaly analysis data. After loading the proxy tracking program package into the business process through the release script, the method further includes: generating a tracing log for the business system through the proxy tracking program; the tracing log includes a tracing identifier, a subsystem identifier, an IP address, and a tracing time; generating a log file for the business system through a log component; the log file includes a subsystem identifier, an IP address, and a log time. In this way, the tracing log containing the tracing identifier, subsystem identifier, IP address, and tracing time and the log file containing the subsystem identifier, IP address, and log time are associated and reported to the collection server. This ensures that the collection server simultaneously contains the anomaly object and its corresponding tracing log and log file, which can be used by developers for retrieval.

[0054] This application provides a method for obtaining anomaly analysis data, further comprising: determining the tracking identifier based on the anomaly object; determining the tracking log based on the tracking identifier; determining the subsystem identifier, IP address, and tracking time of the anomaly based on the tracking log; and determining the anomaly log and context log of the anomaly from the log file based on the subsystem identifier, IP address, and tracking time. In other words, the anomaly object and the tracking log can be associated through the tracking identifier, and the tracking log and the log file can be associated through the subsystem identifier, IP address, and time, which helps developers quickly obtain anomaly-related information and quickly locate the root cause of the anomaly.

[0055] Based on the above system architecture and method flow, embodiments of this application provide a method flow for monitoring anomalies in a business system, such as... Figure 4 As shown, it includes:

[0056] Step 401: The distribution server calls the configuration management database interface in the business system to obtain a complete list of IP addresses in the business system. This list may include container IP addresses and virtual machine IP addresses.

[0057] Step 402: The distribution server sends the publishing script to the corresponding business server according to the IP address list.

[0058] Step 403: Publish a script to check the business processes of the subsystem.

[0059] Step 404: Publish the script to determine whether the business process meets the set conditions. If it does, continue to step 405; if it does not, stop the process.

[0060] Step 405: Publish the script to determine whether the library package of the subsystem contains a preset common class.

[0061] Step 406: If the script determines that the library package of the subsystem contains a preset common class, then the first proxy tracking package is obtained for the business process of the subsystem. After executing step 408, step 409 is executed.

[0062] Step 407: If the script determines that the library package of the subsystem does not contain a preset common class, then the second proxy instrumentation package is obtained for the business process of the subsystem. Furthermore, after executing step 408, step 409 is unnecessary.

[0063] Step 408: The proxy tracking program runs the first preset statement in the proxy tracking program package to obtain the business process, and runs the second preset statement in the proxy tracking program package to load the proxy tracking program package into the business process.

[0064] Step 409: The proxy event tracking program downloads the preset common classes to the Bootstrap root loader.

[0065] Step 410: If the proxy tracking program detects a process in the subsystem, it will generate tracking and tracking information for that process.

[0066] Step 411: The proxy tracking program adds the tracking information to the context of the thread.

[0067] Step 412: If the proxy tracking program determines that an exception has occurred in the process, it intercepts the exception method and constructs an exception object based on the exception information and the thread context. This exception object can be constructed according to a set standard so that the data acquisition server can correctly parse it. For example, for the Opentelemetry platform, the exception object can be constructed according to the Opentelemetry standard specification and reported to the data acquisition server, allowing the server to correctly parse the exception object according to the Opentelemetry standard. This is just an example; the specific standard specification corresponding to the exception object is not limited and can be set according to requirements.

[0068] Step 413: The proxy tracking program reports the abnormal object to the data collection server.

[0069] Step 414: The agent tracking program will report the tracking logs to the data collection server.

[0070] Step 415: The subsystem prints logs to the local machine. The log collection agent collects the logs printed by the subsystem, generates a file, and reports the log file to the collection server for storage.

[0071] Step 416: The data collection server generates an alert based on the abnormal object. This alert can be sent to the developers via SMS or email.

[0072] Step 417: Developers can obtain the exception object through the collection server, analyze the exception information and thread context in the exception object, and if the exception information and thread context cannot completely and accurately locate the root cause of the exception, they can obtain the trace log associated with the exception object, and further obtain the log file.

[0073] It should be noted that the above process steps are not unique. For example, steps 401 to 411 are the process steps for the proxy event tracking program to automatically load; steps 412 and 413 are the process steps for the proxy event tracking program to report abnormal objects. These two process steps do not need to be executed together, and step 414 can be executed independently.

[0074] Based on the same concept Figure 5 An exemplary schematic diagram of a business system anomaly monitoring device provided in an embodiment of the present invention is shown, such as... Figure 5 As shown, the business system deploys a deployment script, including:

[0075] The determination module 501 is used to determine the running status of each business process in the business system through the release script;

[0076] The processing module 502 is used to, for any business process, when the running status of the business process is determined by the release script to meet the set conditions, obtain the proxy tracking program package of the business system from the distribution server; and load the proxy tracking program package into the business process by the release script to perform abnormal monitoring of the business system.

[0077] Optionally, the processing module 502 is specifically configured to: determine the library package of the business system subsystem corresponding to the business process through the release script; if the library package includes a preset common class, obtain a first proxy tracking package from the distribution server; the first proxy tracking package does not contain the preset common class but contains the calling logic of the preset common class; if the library package does not contain the preset common class, obtain a second proxy tracking package from the distribution server; the second proxy tracking package contains the preset common class and contains the calling logic of the preset common class.

[0078] Optionally, the processing module 502 is specifically used to: determine, through the release script, that the development tool version used by the business process is greater than or equal to a preset development tool version, that the remaining metadata space of the business process is greater than a preset metadata space, and that the remaining heap space of the business system is greater than a preset heap space.

[0079] Optionally, the processing module 502 is specifically used to: obtain the business process through the first preset statement in the proxy tracking package, and load the proxy tracking package into the business process through the second preset statement in the proxy tracking package.

[0080] Optionally, the processing module 502 is further configured to: start the proxy tracking program corresponding to the proxy tracking program package;

[0081] The predefined common class is downloaded to the predefined root loader through the proxy tracking program.

[0082] Optionally, the processing module 502 is further configured to: add the tracking information of the tracked process to the context of the corresponding thread through the proxy tracking program corresponding to the proxy tracking program package; the tracking information includes a tracking identifier;

[0083] If the tracked process encounters an anomaly, the abnormal method is intercepted by the proxy tracking program, and the abnormal object corresponding to the abnormal method is determined. The abnormal object includes abnormal information and the thread context.

[0084] Optionally, the processing module 502 is further configured to: generate a tracking log of the business system through the proxy tracking program; the tracking log includes a tracking identifier, a subsystem identifier, an IP address, and a tracking time; and generate a log file of the business system through a log component; the log file includes a subsystem identifier, an IP address, and a log time.

[0085] Optionally, the processing module 502 is further configured to: determine the tracking identifier based on the abnormal object; determine the tracking log based on the tracking identifier; determine the subsystem identifier, IP address, and tracking time of the abnormality based on the tracking log; and determine the abnormal log and context log of the abnormality from the log file based on the subsystem identifier, IP address, and tracking time.

[0086] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.

[0089] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0090] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for monitoring anomalies in a business system, characterized in that, The business system has a deployment script, and the method includes: The running status of each business process in the business system is determined by the release script; For any business process, when the publishing script determines that the running status of the business process meets the set conditions, the proxy event tracking package of the business process is obtained from the distribution server. The proxy event tracking package is loaded into the business process via the release script to perform anomaly monitoring of the business system; The step of obtaining the proxy event tracking package for the business process from the distribution server includes: The release script determines the library package of the business system subsystem corresponding to the business process. If the library package includes a preset common class, then the first proxy tracking package is obtained from the distribution server; the first proxy tracking package does not contain the preset common class but contains the calling logic of the preset common class. If the library package does not include a preset common class, then a second proxy tracking package is obtained from the distribution server; the second proxy tracking package contains the preset common class and the calling logic of the preset common class; The step of loading the proxy tracking package into the business process via the release script for anomaly monitoring of the business system includes: The first or second proxy event tracking package is loaded into the business process through the release script, and the proxy event tracking program corresponding to the first or second proxy event tracking package is started; the default common class is downloaded to the default root loader through the proxy event tracking program, so that the proxy event tracking program and the business system subsystem share the default common class, thereby performing abnormal monitoring of the business system; The tracking information of the tracked process is added to the context of the corresponding thread through the proxy tracking program corresponding to the first proxy tracking program package or the second proxy tracking program package; the tracking information includes tracking identifiers; If the tracked process encounters an anomaly, the abnormal method is intercepted by the proxy tracking program, and the abnormal object corresponding to the abnormal method is determined. The abnormal object includes abnormal information and the thread context.

2. The method as described in claim 1, characterized in that, The deployment script determines that the running status of the business process meets the set conditions, including: The deployment script determines that the development tool version used by the business process is greater than or equal to the preset development tool version, the remaining metadata space of the business process is greater than the preset metadata space, and the remaining heap space of the business system is greater than the preset heap space.

3. The method as described in claim 1, characterized in that, The process of loading the proxy event tracking package into the business process via the release script includes: The business process is obtained through the first preset statement in the proxy tracking package, and the proxy tracking package is loaded into the business process through the second preset statement in the proxy tracking package; the proxy tracking package includes the first proxy tracking package or the second proxy tracking package.

4. The method as described in claim 1, characterized in that, After loading the proxy event tracking package into the business process via the release script, the process further includes: The tracking logs of the business system are generated through the agent tracking program; the tracking logs include tracking identifier, subsystem identifier, IP address, and tracking time; The log file of the business system is generated by the log component; the log file includes the subsystem identifier, IP address and log time.

5. The method as described in claim 4, characterized in that, Also includes: The tracking identifier is determined based on the abnormal object; The tracking log is determined based on the tracking identifier; Based on the tracking logs, determine the identifier, IP address, and tracking time of the subsystem where the anomaly occurred; Based on the subsystem identifier, IP address, and tracing time, the exception log and context log of the occurrence are determined from the log file.

6. A business system anomaly monitoring device, characterized in that, The business system is deployed with a deployment script, and the device includes: The determination module is used to determine the running status of each business process in the business system through the release script; The processing module is used to, for any business process, when the running status of the business process meets the set conditions determined by the release script, obtain the proxy tracking package of the business system from the distribution server; and load the proxy tracking package into the business process through the release script to perform abnormal monitoring of the business system. The processing module is specifically used to determine the library package of the business system subsystem corresponding to the business process through the release script; if the library package includes a preset common class, then obtain a first proxy tracking package from the distribution server; the first proxy tracking package does not contain the preset common class but contains the calling logic of the preset common class; if the library package does not include the preset common class, then obtain a second proxy tracking package from the distribution server; the second proxy tracking package contains the preset common class and contains the calling logic of the preset common class; load the first proxy tracking package or the second proxy tracking package into the business process through the release script, and start the first proxy. The proxy event tracking program corresponding to the first proxy event tracking package or the second proxy event tracking package; the proxy event tracking program downloads the preset common class to the preset root loader so that the proxy event tracking program and the business system subsystem share the preset common class, thereby performing anomaly monitoring of the business system; the proxy event tracking program corresponding to the first proxy event tracking package or the second proxy event tracking package adds the tracking information of the tracked process to the context of the corresponding thread; the tracking information includes a tracking identifier; if the tracked process encounters an anomaly, the proxy event tracking program intercepts the anomaly method, determines the anomaly object corresponding to the anomaly method, and the anomaly object includes anomaly information and the thread context.

7. A computer device, characterized in that, include: Memory, used to store computer programs; A processor is configured to invoke a computer program stored in the memory and execute the method as described in any one of claims 1 to 5 according to the obtained program.

Citation Information

Patent Citations

  • Method for automatically deploying software agent end for Linux system

    CN111209012A

  • System and method of deploying java agents in runtime

    US10977027B1