CN111797014A - Cross-application case tracking method and device - Google Patents

Cross-application case tracking method and device Download PDF

Info

Publication number
CN111797014A
CN111797014A CN202010611850.0A CN202010611850A CN111797014A CN 111797014 A CN111797014 A CN 111797014A CN 202010611850 A CN202010611850 A CN 202010611850A CN 111797014 A CN111797014 A CN 111797014A
Authority
CN
China
Prior art keywords
application
calling
distributed
link
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010611850.0A
Other languages
Chinese (zh)
Inventor
程孝侠
黄震人
熊小庆
文弘扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010611850.0A priority Critical patent/CN111797014A/en
Publication of CN111797014A publication Critical patent/CN111797014A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a cross-application case tracking method and device. The method comprises the following steps: acquiring a distributed application unique identifier; according to the unique identifier of the distributed application, a bytecode enhancement technology is utilized to inject a link tracking code into a program of the distributed application; collecting programs, link calling processes and calling stack information of all distributed applications by using the link tracking codes; and distinguishing the calling relation among the distributed applications according to the programs, the link calling processes and the calling stack information of the distributed applications to form a link calling complete process. According to the invention, the link tracking code is injected when the program is loaded, so that the complete program acquisition in the case execution process of the cross-application is realized, the link calling process among the distributed applications is tracked, and the influence of the case tracking code on the performance of the execution of the service is avoided.

Description

Cross-application case tracking method and device
Technical Field
The present invention relates to the field of section code enhancement technologies, and in particular, to a method and an apparatus for cross-application case tracking.
Background
Today, as the internet is developed at a high speed, various applications are generated along with the living demands, the application service architecture is more complex, the interaction between the applications is frequent, a large number of concurrent connections need to be supported, and the internet architecture is expanded horizontally and vertically. In the longitudinal expansion process, services and functions needed by application are organically combined, so that a more complex software stack combination is caused, compared with the traditional three-layer architecture, the design of the N-layer architecture is more common, and the complexity of the system is improved. In the process of horizontal expansion, more and more applications are beginning to be distributed, such as micro-services, messaging, distributed databases, distributed caches, distributed storage objects, cross-domain calls and the like, which together form a complex distributed network environment. With the expansion of the system architecture, tracking of a program covered by a test case in the execution process of distributed application becomes more difficult, and the acquisition of codes in the case execution process by using a traditional code intrusive mode brings additional performance problems of the application and is still ineffective for the application adopting cross-application distributed link calling and N-layer architecture design.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a cross-application case tracking method and device, which can be used for realizing the acquisition and tracking of a complete program in the cross-application case execution process and simultaneously avoiding the influence of a case tracking code on the execution performance of a service.
In order to achieve the above object, an embodiment of the present invention provides a cross-application case tracking method, where the method includes:
acquiring a distributed application unique identifier;
according to the unique identifier of the distributed application, a bytecode enhancement technology is utilized to inject a link tracking code into a program of the distributed application;
collecting programs, link calling processes and calling stack information of all distributed applications by using the link tracking codes;
and distinguishing the calling relation among the distributed applications according to the programs, the link calling processes and the calling stack information of the distributed applications to form a link calling complete process.
Optionally, in an embodiment of the present invention, the link tracing code includes an interceptor code and an enhancement code.
Optionally, in an embodiment of the present invention, the acquiring, by using the link tracking code, the program, the link calling procedure, and the call stack information of each distributed application includes: collecting a program of a distributed application by using the interceptor code; and adding an application level identifier in the message transmission process of each distributed application by using the enhanced code, and acquiring a path calling process and calling stack information of each distributed application by using the application level identifier.
Optionally, in an embodiment of the present invention, the method further includes: and calling a complete process for the programs and the links of the distributed applications in an asynchronous data transmission mode to perform distributed data storage.
The embodiment of the invention also provides a cross-application case tracking device, which comprises:
the unique identifier module is used for acquiring a unique identifier of the distributed application;
the code injection module is used for injecting the link tracking code into the distributed application program by using a byte code enhancement technology according to the unique identifier of the distributed application;
the data acquisition module is used for acquiring programs, link calling processes and calling stack information of all distributed applications by using the link tracking codes;
and the calling process module is used for distinguishing calling relations among the distributed applications according to the programs, the link calling processes and the calling stack information of the distributed applications so as to form a link calling complete process.
Optionally, in an embodiment of the present invention, the link tracing code includes an interceptor code and an enhancement code.
Optionally, in an embodiment of the present invention, the data acquisition module includes: the interceptor code unit is used for acquiring a program of the distributed application by utilizing the interceptor code; and the enhancement code unit is used for adding an application level identifier in the message transmission process of each distributed application by using the enhancement code and acquiring a path calling process and calling stack information of each distributed application by using the application level identifier.
Optionally, in an embodiment of the present invention, the apparatus further includes: and the data storage module is used for calling a complete process for the programs and the links of the distributed applications in an asynchronous data transmission mode to perform distributed data storage.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
According to the invention, the link tracking code is injected when the program is loaded, so that the complete program acquisition in the case execution process of the cross-application is realized, the link calling process among the distributed applications is tracked, and the influence of the case tracking code on the performance of the execution of the service is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flowchart of a cross-application case tracking method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a link tracking process according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system architecture for applying a cross-application case tracking method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a message passing process between application nodes according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating the implementation of message passing between application nodes according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a message passing process between application nodes after adding a link tracking code according to an embodiment of the present invention;
FIG. 7 is a flowchart of the operation of a system for applying a cross-application case tracking method in an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a cross-application case tracking apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a cross-application case tracking method and device.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a cross-application case tracking method according to an embodiment of the present invention, where the method includes:
step S1, a distributed application unique identifier is obtained.
Before the unique identifier of the distributed application is acquired, the unique identifier and the name of the application of the distributed application are recorded. The application unique identifiers must not be the same for different distributed applications. For different nodes of the distributed application, the modes of the same application identifier and different application names can be adopted.
And step S2, injecting a link tracking code into the program of the distributed application by using a byte code enhancement technology according to the unique identifier of the distributed application.
The link tracking code comprises an interceptor code and an enhancement code, and is injected into a program of the distributed application. Specifically, by adopting bytecode enhancement and a JVMTI interface technology, link trace codes of distributed transactions are injected during the loading of distributed application classes, and the injected link trace codes can add application-level identifiers as associations between messages when messages are transmitted between nodes of distributed applications.
And step S3, collecting the program, the link calling process and the calling stack information of each distributed application by using the link tracking code.
Specifically, during case execution, a method of injecting link trace code is invoked, wherein the injected interceptor code performs a distributed link program acquisition across applications according to the identifiers of the applications. The injected enhanced code can add application-level identifiers as associations between messages when message passing occurs between nodes of the distributed application, so as to track call link processes between applications and between nodes, as shown in fig. 2. In fig. 2, Node1 and Node2 belong to the Node of application a, Node3 and Node4 respectively belong to the Node of application b, the whole calling link completes a transaction with the transaction number Txid, and the scheduling relationship between the nodes is labeled by using SpanId and pSpanId, so that the labeling of the calling relationship across applications is completed.
And step S4, distinguishing the call relation among the distributed applications according to the programs, the link call process and the call stack information of the distributed applications to form a link call complete process.
Specifically, after the link calling process and the call stack information of each distributed application are collected and analyzed according to fig. 2 by using the link tracking code, the completed link calling process can be formed by distinguishing the calling relationship between the applications.
As one embodiment of the invention, the link trace code includes an interceptor code and an enhancement code.
In this embodiment, the collecting, by using the link tracking code, the program, the link calling procedure, and the call stack information of each distributed application includes: collecting a program of a distributed application by using the interceptor code; and adding an application level identifier in the message transmission process of each distributed application by using the enhanced code, and acquiring a path calling process and calling stack information of each distributed application by using the application level identifier.
Wherein the injected interceptor code performs a distributed link program acquisition across the application according to the identifier of the application. The injected enhanced code can add application-level identifiers as associations between messages when message passing occurs among nodes of the distributed application, so that calling link processes among applications and among nodes are tracked.
As an embodiment of the invention, the method further comprises: and calling a complete process for the programs and the links of the distributed applications in an asynchronous data transmission mode to perform distributed data storage.
The collected data are transmitted and stored by using an asynchronous data transmission thread TCP/UDP + Thrift mode.
In an embodiment of the present invention, a schematic system structure diagram of a cross-application case tracking method is shown in fig. 3, which specifically includes: the system comprises a control management module 1, an application probe module 2, a data transmission module 3 and a data storage module 4. The application probe module is deployed in a distributed application system and interacts with a control management module 1 and a data sending module 3, the application probe module 2 acquires parameters such as a unique mark and a rule of a distributed application 5 from the control management module 1, then program collection is carried out on a call link of the distributed application in a case execution process, the collected program is transmitted to the data sending module 3 in a UDP/TCP + Thrift mode, and the data sending module 3 is written into a data storage module 4 in batches.
Specifically, the control management module 1 is configured to implement functions of management of deployed distributed applications, control switch management, application probe management, and the like. To implement the acquisition of the cross-application distributed link program and case contrast relationship of the deployed distributed application, the following steps are firstly completed: 1) and entering an application unique identifier and a name of the distributed application. The application identifiers must not be the same for different distributed applications. For different nodes of the distributed application, the modes of the same application identifier and different application names can be adopted. 2) A unique identifier, location, version of the application probe is defined. 3) The acquisition frequency of the distributed application is defined, i.e. the procedure deciding whether to acquire the distributed call link procedure partially or fully. 4) And setting the distributed call link acquisition switch to be in an opening state.
The application probe module 2 is configured to start working when the control management module switch is set to an on state, and is deployed in a distributed application system, and each node has multiple nodes for the same application, and each node needs to be configured. The concrete implementation is as follows:
the application probe module 2 relies on the JVM's extended interface set (JVMTI) to start the application probe module 2 at the same time as the distributed application system starts. And injecting link tracking and intercepting codes of distributed transactions during the loading of the distributed application classes, wherein the injected link tracking codes can add identifiers at the application level as the association between messages when the messages are transmitted among nodes of the distributed application, and when a code injection method is called in the case execution process, the injected interceptor codes start the program collection of the distributed links and transmit the collected program codes to the data transmission module 3 by using asynchronous threads. The message transmission process between the abstract application nodes is a message input parameter, internal message processing logic and 3 parts of a return message, as shown in fig. 4, and the execution flow is shown in fig. 5.
The link call procedure of the distributed application injects enhancement code using bytecode enhancement techniques as follows for () logic and After () logic, as shown in fig. 6. The link tracing code can add an identifier at an application level as an association between messages when message passing occurs between nodes of the distributed application, so as to trace a call link process between applications and between nodes, and the tracing and identifying process is specifically shown in fig. 2.
The overall workflow and data flow of the system applying the cross-application case tracking method are shown in fig. 7, and are specifically divided into 3 stages:
stage S10: a stage of starting the distributed application system, in which operations such as starting of an application probe, injection of byte codes and the like are realized, specifically as follows:
step S101: the tester starts the distributed application system, and for a distributed application, each node to be started comprises a plurality of nodes.
Step S102: when the distributed system is started, the application probe modules of all the nodes are started together with the application by using the JVM tool interface.
After the application probe module is started, a request is sent to the control management module to acquire the distributed application unique identifier and the control switch information which are set in the control management module 1, and the information is refreshed into the memory.
Step S103: according to the distributed application unique identifier, the bytecode technology is utilized to modify the bytecode of the loaded program in the JVM in the application link information calling process, and specifically, the link tracking code is injected into the program.
Stage S20: and in the cross-application acquisition stage, a tester starts to execute a series of case operations, in the case execution process, a series of link calling programs in the distributed system are triggered, program acquisition codes in the injected interceptors run in the program calling process to start program acquisition, and the acquired codes are transmitted to a data sending module by using TCP/UDP + Thrift to prepare for being written into storage equipment. The method comprises the following specific steps:
step S201: a tester executes a specific case in the distributed application system, and distributed link calling is carried out among applications in the case execution process.
Step S202: after the distributed link call is triggered, since the link trace code is injected into the program (see fig. 6 for details), the execution of the injected link trace code is performed before the program is executed.
Step S203: the link tracking code collects and analyzes the link calling process and the call stack information of each distributed application according to fig. 2, distinguishes the calling relationship among the applications, and forms a completed link calling process. And transmitting the acquired data to the data transmission module by using an asynchronous data transmission thread in a TCP/UDP + Thrift mode.
Step S204: and transmitting the collected link calling process data to a data storage module in a data transmission module by adopting an asynchronous data transmission thread in a TCP/UDP + Thrift mode.
Step S30: and in the data storage stage, an asynchronous thread signal transmitted by the data transmission module is received, a data sending thread is informed, and sending data is written into the data storage module.
Step S301: and receiving an asynchronous thread signal of the data transmission module, notifying a data sending thread, and writing the asynchronous thread signal into the distributed data storage module in batches.
Step S302: the distributed data storage module can determine a medium for storing the collected programs according to the number of cases, and can store common databases or distributed files, and the data transmission mode is subject to requirements.
According to the invention, the link tracking code is injected when the program is loaded, so that the complete program acquisition in the case execution process of the cross-application is realized, the link calling process among the distributed applications is tracked, and the influence of the case tracking code on the performance of the execution of the service is avoided.
Fig. 8 is a schematic structural diagram of a cross-application case tracking apparatus according to an embodiment of the present invention, where the apparatus includes:
a unique identifier module 10 for obtaining a distributed application unique identifier.
Before the unique identifier of the distributed application is acquired, the unique identifier and the name of the application of the distributed application are recorded. The application unique identifiers must not be the same for different distributed applications. For different nodes of the distributed application, the modes of the same application identifier and different application names can be adopted.
And the code injection module 20 is used for injecting the link tracking code into the program of the distributed application by utilizing a byte code enhancement technology according to the unique identifier of the distributed application.
Wherein the link tracking code includes an interceptor code and an enhancement code. Specifically, by adopting bytecode enhancement and a JVMTI interface technology, link trace codes of distributed transactions are injected during the loading of distributed application classes, and the injected link trace codes can add application-level identifiers as associations between messages when messages are transmitted between nodes of distributed applications.
And the data acquisition module 30 is configured to acquire the program, the link calling process, and the call stack information of each distributed application by using the link tracking code.
Specifically, during case execution, a method of injecting link trace code is invoked, wherein the injected interceptor code performs a distributed link program acquisition across applications according to the identifiers of the applications. The injected enhanced code can add application-level identifiers as associations between messages when message passing occurs between nodes of the distributed application, so as to track call link processes between applications and between nodes, as shown in fig. 2. In fig. 2, Node1 and Node2 belong to the Node of application a, Node3 and Node4 respectively belong to the Node of application b, the whole calling link completes a transaction with the transaction number Txid, and the scheduling relationship between the nodes is labeled by using SpanId and pSpanId, so that the labeling of the calling relationship across applications is completed.
And the calling process module 40 is used for distinguishing calling relations among the distributed applications according to the programs, the link calling processes and the calling stack information of the distributed applications so as to form a link calling complete process.
Specifically, the link tracking code may collect and analyze the link calling process and call stack information of each distributed application according to fig. 2, and distinguish the calling relationship between the applications to form a completed link calling process.
As one embodiment of the invention, the link trace code includes an interceptor code and an enhancement code.
In this embodiment, the data acquisition module includes: the interceptor code unit is used for acquiring a program of the distributed application by utilizing the interceptor code; and the enhancement code unit is used for adding an application level identifier in the message transmission process of each distributed application by using the enhancement code and acquiring a path calling process and calling stack information of each distributed application by using the application level identifier.
As an embodiment of the present invention, the apparatus further comprises: and the data storage module is used for calling a complete process for the programs and the links of the distributed applications in an asynchronous data transmission mode to perform distributed data storage.
Based on the same application concept as the cross-application case tracking method, the invention also provides the cross-application case tracking device. Since the principle of solving the problem of the cross-application case tracking device is similar to that of a cross-application case tracking method, the implementation of the cross-application case tracking device can be referred to the implementation of the cross-application case tracking method, and repeated details are not repeated.
According to the invention, the link tracking code is injected when the program is loaded, so that the complete program acquisition in the case execution process of the cross-application is realized, the link calling process among the distributed applications is tracked, and the influence of the case tracking code on the performance of the execution of the service is avoided.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
As shown in fig. 9, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 9; furthermore, the electronic device 600 may also comprise components not shown in fig. 9, which may be referred to in the prior art.
As shown in fig. 9, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may 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, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A cross-application case tracking method, the method comprising:
acquiring a distributed application unique identifier;
according to the unique identifier of the distributed application, a bytecode enhancement technology is utilized to inject a link tracking code into a program of the distributed application;
collecting programs, link calling processes and calling stack information of all distributed applications by using the link tracking codes;
and distinguishing the calling relation among the distributed applications according to the programs, the link calling processes and the calling stack information of the distributed applications to form a link calling complete process.
2. The method of claim 1, wherein the link trace code comprises an interceptor code and an enhancement code.
3. The method of claim 2, wherein collecting, using the link trace code, program, link call procedure, and call stack information for each distributed application comprises:
collecting a program of a distributed application by using the interceptor code;
and adding an application level identifier in the message transmission process of each distributed application by using the enhanced code, and acquiring a path calling process and calling stack information of each distributed application by using the application level identifier.
4. The method of claim 1, further comprising: and calling a complete process for the programs and the links of the distributed applications in an asynchronous data transmission mode to perform distributed data storage.
5. A cross-application case tracking apparatus, the apparatus comprising:
the unique identifier module is used for acquiring a unique identifier of the distributed application;
the code injection module is used for injecting the link tracking code into the distributed application program by using a byte code enhancement technology according to the unique identifier of the distributed application;
the data acquisition module is used for acquiring programs, link calling processes and calling stack information of all distributed applications by using the link tracking codes;
and the calling process module is used for distinguishing calling relations among the distributed applications according to the programs, the link calling processes and the calling stack information of the distributed applications so as to form a link calling complete process.
6. The apparatus of claim 5, wherein the link trace code comprises an interceptor code and an enhancement code.
7. The apparatus of claim 6, wherein the data acquisition module comprises:
the interceptor code unit is used for acquiring a program of the distributed application by utilizing the interceptor code;
and the enhancement code unit is used for adding an application level identifier in the message transmission process of each distributed application by using the enhancement code and acquiring a path calling process and calling stack information of each distributed application by using the application level identifier.
8. The apparatus of claim 5, further comprising: and the data storage module is used for calling a complete process for the programs and the links of the distributed applications in an asynchronous data transmission mode to perform distributed data storage.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 4 when executing the program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 4.
CN202010611850.0A 2020-06-30 2020-06-30 Cross-application case tracking method and device Pending CN111797014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010611850.0A CN111797014A (en) 2020-06-30 2020-06-30 Cross-application case tracking method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010611850.0A CN111797014A (en) 2020-06-30 2020-06-30 Cross-application case tracking method and device

Publications (1)

Publication Number Publication Date
CN111797014A true CN111797014A (en) 2020-10-20

Family

ID=72811528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010611850.0A Pending CN111797014A (en) 2020-06-30 2020-06-30 Cross-application case tracking method and device

Country Status (1)

Country Link
CN (1) CN111797014A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363855A (en) * 2020-11-13 2021-02-12 北京基调网络股份有限公司 Call chain data generation method, topology generation method and system and computer equipment
CN112527619A (en) * 2020-12-20 2021-03-19 大唐互联科技(武汉)有限公司 Analysis link calling method and system based on directed acyclic graph structure

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106326017A (en) * 2016-08-17 2017-01-11 广东亿迅科技有限公司 Realization system for call chain based on Annotation application
CN111026601A (en) * 2019-09-23 2020-04-17 拉扎斯网络科技(上海)有限公司 Monitoring method and device for Java application system, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106326017A (en) * 2016-08-17 2017-01-11 广东亿迅科技有限公司 Realization system for call chain based on Annotation application
CN111026601A (en) * 2019-09-23 2020-04-17 拉扎斯网络科技(上海)有限公司 Monitoring method and device for Java application system, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363855A (en) * 2020-11-13 2021-02-12 北京基调网络股份有限公司 Call chain data generation method, topology generation method and system and computer equipment
CN112363855B (en) * 2020-11-13 2021-06-18 北京基调网络股份有限公司 Call chain data generation method, topology generation method and system and computer equipment
CN112527619A (en) * 2020-12-20 2021-03-19 大唐互联科技(武汉)有限公司 Analysis link calling method and system based on directed acyclic graph structure

Similar Documents

Publication Publication Date Title
CN107832100B (en) APK plug-in loading method and terminal thereof
CN108228444B (en) Test method and device
CN108984389B (en) Application program testing method and terminal equipment
CN107423213B (en) File descriptor distribution detection method and device
CN111782525B (en) Java method remote debugging method and device
CN101959193A (en) Information safety detection method and a mobile terminal
CN112463634A (en) Software testing method and device under micro-service architecture
CN111797014A (en) Cross-application case tracking method and device
CN111797015B (en) Dynamic byte code based test method and device
CN111858112B (en) Method, client and server for detecting memory leakage
CN111796860A (en) Micro front-end scheme implementation method and device
CN113157345A (en) Automatic starting method and device for front-end engineering
CN113760611B (en) System site switching method and device, electronic equipment and storage medium
CN112671878B (en) Block chain information subscription method, device, server and storage medium
CN104320766A (en) Spam short message identification method, device and equipment
CN111767558A (en) Data access monitoring method, device and system
CN114428737A (en) Communication method, device, equipment and storage medium based on micro service system
CN114840421A (en) Log data processing method and device
CN114490402A (en) Method and device for checking validity of message field
CN116107781A (en) Log tracking method, device, electronic equipment and computer program product
CN113050985A (en) Front-end engineering dependence automatic registration method and device
CN113515447A (en) System automation test method and device
CN113297076B (en) Service change identification method and device based on call chain diagram
CN110647474A (en) Anti-interference method and device for automatic regression test, computer equipment and storage medium
CN111324888B (en) Verification method and device for application program starting, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination