Interface monitoring method, device, equipment and medium
By embedding monitoring components in the closure function of the interface and generating interface operation reports, the existing interface monitoring solution solves the problems of large code volume and high maintenance difficulty, achieves efficient interface monitoring, and reduces the difficulty of code maintenance and architectural coupling. Spend.
Patent Information
- Application Number
- CN202110990680.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-08-26
AI Technical Summary
The existing interface monitoring solution has a high degree of architectural coupling, a large amount of code, and difficulty in locating the code. When the interface parameters change, it needs to be modified or maintained separately, which increases the difficulty of code modification or maintenance and results in low monitoring efficiency.
Provide an interface monitoring method by obtaining the interface monitoring component, uploading it to the server, and embedding points in the closure function of the interface to monitor the running data of the interface, generate interface running reports, and use the Metrics class to monitor memory occupation and thread allocation , Meters, Gauges, Counters, Histograms and other data, and transfer reports to Influxdb and Grafana systems for display.
It reduces the difficulty of code implementation for interface monitoring and improves the efficiency of interface monitoring. The monitoring of each interface is realized through shared interface monitoring components. There is no need to write separate monitoring code for each interface, which simplifies code maintenance and reduces architectural coupling.
Smart Images

Figure CN113672470B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an interface monitoring method, device, equipment and medium. Background Art
[0002] In the prior art, it is necessary to monitor various operating data when the interface is running, such as the memory size occupied by the interface and the number of allocated threads, as well as the interface's Meters, Gauges, Counters, Histograms and Timers and other data. At present, in order to monitor the above-mentioned operating data, it is necessary to write a large amount of Meters code before the business logic code of each interface, and combine the Meters code in the Controller of each service. This interface monitoring solution has a high degree of coupling in architecture (code and interface), a large amount of code needs to be written, and code location is difficult. When the interface parameters change, the monitoring code of each interface needs to be modified or maintained separately, which increases the difficulty of code modification or maintenance.
[0003] In view of this, a more efficient interface monitoring solution is needed. Summary of the invention
[0004] The embodiments of this specification provide an interface monitoring method, device, equipment and medium to solve the technical problem of how to perform interface monitoring more efficiently.
[0005] To solve the above technical problems, the embodiments of this specification provide the following technical solutions:
[0006] The embodiment of this specification provides an interface monitoring method, including:
[0007] Obtain an interface monitoring component, and upload the interface monitoring component to a server;
[0008] After the interface monitoring component is downloaded from the server and connected to the interface, the connected interface monitoring component is embedded in the closure function of the interface to monitor the operation data of the interface;
[0009] An interface operation report is generated according to the operation data.
[0010] Optionally, the interface monitoring component encapsulates a Metrics class.
[0011] Optionally, the interface accessing the interface monitoring component includes:
[0012] The download address is configured in the Maven setting file of the interface, so that the interface can access the downloaded interface monitoring component after downloading the interface monitoring component through the download address.
[0013] Optionally, the interface monitoring component has a component template; the embedded point of the interface monitoring component connected includes in the closure function of the interface:
[0014] The component template is used in the service layer of the interface, and the name and / or URL address and / or key value of the interface is passed into the closure function of the component template.
[0015] Optionally, monitoring the operation data of the interface includes:
[0016] Monitor the operation data of the interface through Metrics.
[0017] Optionally, the running data includes one or more of occupied memory data, thread allocation data, Meters data, Gauges data, Counters data, Histograms data and Timers data.
[0018] Optionally, after generating an interface operation report according to the operation data, the method further includes:
[0019] The operation report is transmitted to the Influxdb and Grafana systems for display.
[0020] The embodiment of this specification provides an interface monitoring device, including:
[0021] A construction module is used to obtain an interface monitoring component and upload the interface monitoring component to a server;
[0022] A monitoring module, for burying the interface monitoring component in the closure function of the interface to monitor the operation data of the interface after the interface monitoring component is downloaded from the server and connected to the interface;
[0023] A reporting module is used to generate an interface operation report based on the operation data.
[0024] The embodiment of this specification provides an interface monitoring device, including:
[0025] at least one processor;
[0026] as well as,
[0027] a memory communicatively coupled to the at least one processor;
[0028] in,
[0029] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned interface monitoring method.
[0030] An embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the above-mentioned interface monitoring method is implemented.
[0031] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0032] Build a public, sharable interface monitoring component. Each interface can monitor the interface operation data by referencing the interface monitoring component. There is no need to write monitoring code for each interface separately, thereby reducing the difficulty of code implementation for interface monitoring and improving interface monitoring efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following is a brief introduction to the drawings required for use in the embodiments of this specification or the prior art description. Obviously, the drawings introduced below are only some of the drawings that may be involved in the embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 It is a schematic diagram of the execution body of the interface monitoring method in the first embodiment of this specification.
[0035] Figure 2 It is a flowchart of the interface monitoring method in the first embodiment of this specification.
[0036] Figure 3 It is a structural diagram of the interface monitoring device in the second embodiment of this specification. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions of the embodiments of this specification will be clearly and completely described below in conjunction with the drawings of the embodiments of this specification. Obviously, the embodiments described in this specification are only some embodiments of this application, not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0038] In the prior art, it is necessary to monitor various operating data when the interface is running, such as the memory size occupied by the interface and the number of allocated threads, as well as the interface's Meters, Gauges, Counters, Histograms and Timers and other data. At present, for any interface, in order to monitor the above-mentioned operating data of the interface, it is necessary to write a large amount of Meters code before the business logic code of the interface, and combine the Meters code in the Controller of the service corresponding to the interface. This interface monitoring solution has a high degree of coupling in architecture (code and interface), a large amount of code needs to be written, and code positioning is difficult. When the interface parameters change, the code used for monitoring of each interface needs to be modified or maintained separately, which increases the difficulty of code modification or maintenance. Overall, the current interface monitoring solution has low monitoring efficiency.
[0039] The first embodiment of this specification (hereinafter referred to as "embodiment one") provides an interface monitoring method. The execution subject of embodiment one can be a terminal (including but not limited to mobile phones, computers, pads, televisions) or a server or an operating system or an application or an interface monitoring platform or an interface monitoring system, etc., that is, the execution subject can be various and can be set, used or changed as needed. In addition, a third-party application can also assist the execution subject in executing embodiment one. For example Figure 1 As shown, the interface monitoring method in Example 1 can be executed by a server, and an application corresponding to the server can be installed on a terminal (held by a user). Data can be transmitted between the terminal or the application and the server, and data can be collected, input or output, or pages or information can be processed (for the user) through the terminal or the application, thereby assisting the server in executing the interface monitoring method in Example 1.
[0040] like Figure 2 As shown, the interface monitoring method provided in the first embodiment includes:
[0041] S101: (Executing entity) obtains an interface monitoring component, and uploads the interface monitoring component to a server;
[0042] The execution subject of the first embodiment can obtain the interface monitoring component. The interface monitoring component can be constructed by the execution subject of the first embodiment, so that the execution subject of the first embodiment can obtain the interface monitoring component; or the interface monitoring component can be constructed by other subjects other than the execution subject of the first embodiment, and the execution subject of the first embodiment can obtain the interface monitoring component from the other subjects.
[0043] In the first embodiment, the interface monitoring component can be constructed by creating a new module project in Idea and compiling a jar package. Specifically, the construction of the interface monitoring component may include: encapsulating classes, for example, TomcatMetrics, JVMMetrics, Metrics and other classes can be encapsulated, that is, the interface monitoring component encapsulates the Metrics class (or Metrics framework); defining MetricsReporter, MetricsReporter is an interface interface, which is annotated with SPI; and then packaging it into a jar package that can be integrated and accessed by the backend project, and the jar package is the interface monitoring component.
[0044] After the execution subject of Example 1 obtains the interface monitoring component, the interface monitoring component can be uploaded to the server, so that all parties can directly download the interface monitoring component from the server, thereby improving the propagation efficiency of the interface monitoring component. Specifically, the jar package (i.e., the interface monitoring component) can be uploaded to the nexus maven warehouse, so that the project (i.e., the project to be connected to the interface monitoring component, the project contains interfaces, and the interfaces are accessed after the project is deployed) can be configured in the pom file to share the reference to the jar package (i.e., the interface monitoring component) in the nexus maven warehouse.
[0045] S103: (Executing body) After the interface monitoring component is downloaded from the server and connected to the interface, the connected interface monitoring component is embedded in the closure function of the interface to monitor the operation data of the interface;
[0046] In the first embodiment, the interface monitoring component can be downloaded and accessed by an interface (generally a backend interface). The interface accessing the interface monitoring component may include:
[0047] 1.1. Configure the download address (of the interface monitoring component) in the Maven setting file of the interface (specifically, the interface monitoring component mirror download address of the nexus Maven warehouse can be configured in the Maven setting file of the interface) so that the interface can download the interface monitoring component through the download address (from the server).
[0048] 1.2. (Determination of the execution subject of Embodiment 1) After the interface downloads the interface monitoring component, (the execution subject of Embodiment 1) connects the interface to the downloaded interface monitoring component and uniformly encapsulates the interface and the downloaded interface monitoring component.
[0049] In particular, (the execution subject of the first embodiment) embeds the interface monitoring component to be connected (ie, the interface monitoring component that has been downloaded) in the closure function of the interface.
[0050] In the first embodiment, after the interface monitoring component is constructed by Java closure encapsulation, the interface monitoring component has a component template, that is, the interface monitoring component provides a component template. The interface accessing the interface monitoring component may also include: using the component template (of the downloaded interface monitoring component) at the service layer of the interface, thereby passing the name and / or URL address and / or key value of the interface into the "closure function of the component template used by the service layer of the interface", so that the interface is uniformly encapsulated with the downloaded interface monitoring component, and so that the interface references the interface monitoring component.
[0051] In addition, before the interface accesses the infrastructure library of various services or applications (the infrastructure library includes but is not limited to database clusters, message middleware clusters, Redis cache clusters, etc.), the interface can be connected to the interface monitoring component.
[0052] S105: (Executing entity) generates an interface operation report according to the operation data.
[0053] Through the above content, the interface is connected to the interface monitoring component, the interface and the downloaded interface monitoring component are uniformly packaged, and the connected interface monitoring component is embedded in the closure function of the interface, so that the interface monitoring can monitor the operating data of the interface.
[0054] Since the interface monitoring component encapsulates the Metrics class, after the interface and the downloaded interface monitoring component are uniformly encapsulated, the interface monitoring component can monitor the operation data of the interface through the Metrics technology. The operation data includes but is not limited to one or more of (interface) memory usage data, (interface) thread allocation data, (interface) Meters data, (interface) Gauges data, (interface) Counters data, (interface) Histograms data and (interface) Timers data.
[0055] For example, the interface monitoring component can monitor the memory size or number of threads occupied by the interface (such as Java API) when running on the Tomcat container and the Java virtual machine Jvm through the Metrics technology, as well as the Meters data, Gauges data, Counters data, Histograms data or Timers data of the monitoring interface. Among them, Meters data, Gauges data, Counters data, Histograms data or Timers data are all existing concepts.
[0056] The execution subject of the first embodiment can generate an interface operation report according to the operation data of the interface monitored by the interface monitoring component. Specifically, an spi folder can be defined in the META-INF folder under the resources directory of the project, and the interface implementation class to be loaded can be defined in the spi folder, and then the spi mechanism can be used to generate various operation reports, such as HTTPScheduledMetricsReporter, AdaptiveReporter, etc.
[0057] The execution subject of the first embodiment can display the interface operation report, and can also transmit the operation report to the Influxdb and Grafana system (Influxdb+Grafana system) for display (through the interface monitoring component).
[0058] In the first embodiment, a public and sharable interface monitoring component is constructed, and each interface can download the interface monitoring component through the server, and each interface can also quote or access the interface monitoring component, so that for any interface, the operation monitoring of the interface can be realized by accessing the interface monitoring component, and there is no need to write monitoring code separately for each interface or business system. When the interface parameters change or the interface monitoring method needs to be changed, it is only necessary to modify the interface monitoring component, and each interface can access the modified interface monitoring component. Through the first embodiment, the code implementation difficulty of interface monitoring (including code writing and maintenance difficulty) can be reduced, the coupling degree between interface monitoring and interface in the architecture can be reduced, and the efficiency of interface monitoring can be improved.
[0059] like Figure 3 As shown, the second embodiment of this specification provides an interface monitoring device corresponding to the method of embodiment 1, including:
[0060] A construction module 202 is used to obtain an interface monitoring component and upload the interface monitoring component to a server;
[0061] A monitoring module 204, for embedding the interface monitoring component in the closure function of the interface to monitor the operation data of the interface after the interface monitoring component is downloaded from the server and connected to the interface;
[0062] The reporting module 206 is used to generate an interface operation report according to the operation data.
[0063] Optionally, the interface monitoring component encapsulates a Metrics class.
[0064] Optionally, the device further comprises:
[0065] The access module is used to enable the interface to access the interface monitoring component.
[0066] Optionally, the interface accessing the interface monitoring component includes:
[0067] The download address is configured in the Maven setting file of the interface, so that the interface can access the downloaded interface monitoring component after downloading the interface monitoring component through the download address.
[0068] Optionally, the interface monitoring component has a component template; the embedded point of the interface monitoring component connected includes in the closure function of the interface:
[0069] The component template is used in the service layer of the interface, and the name and / or URL address and / or key value of the interface is passed into the closure function of the component template.
[0070] Optionally, monitoring the operation data of the interface includes:
[0071] Monitor the operation data of the interface through Metrics.
[0072] Optionally, the running data includes one or more of occupied memory data, thread allocation data, Meters data, Gauges data, Counters data, Histograms data and Timers data.
[0073] Optionally, the reporting module 206 is further used to transmit the operation report to Influxdb and Grafana systems for display.
[0074] A third embodiment of the present specification provides an interface monitoring device, including:
[0075] at least one processor;
[0076] as well as,
[0077] a memory communicatively coupled to the at least one processor;
[0078] in,
[0079] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor, so that the at least one processor can execute the interface monitoring method described in the first embodiment.
[0080] A fourth embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the interface monitoring method described in the first embodiment is implemented.
[0081] The above embodiments may be used in combination, and modules with the same name between different embodiments or within the same embodiment may be the same or different modules.
[0082] The above describes specific embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0083] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0084] The apparatus, device, non-volatile computer-readable storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, device, and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device, and non-volatile computer storage medium will not be repeated here.
[0085] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0086] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0087] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0088] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0089] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0090] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0091] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0093] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0094] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0095] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0096] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0097] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0098] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0099] The above is only an embodiment of this specification and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. An interface monitoring method, comprising: Obtain an interface monitoring component, and upload the interface monitoring component to a server; After the interface monitoring component is downloaded from the server and connected to the interface, the connected interface monitoring component is embedded in the closure function of the interface to monitor the operation data of the interface; An interface operation report is generated according to the operation data.
2. According to the method as claimed in claim 1, the interface monitoring component is encapsulated with a Metrics class.
3. The method according to claim 2, wherein the interface accessing the interface monitoring component comprises: The download address is configured in the Maven setting file of the interface, so that the interface can access the downloaded interface monitoring component after downloading the interface monitoring component through the download address.
4. The method according to claim 1, wherein the interface monitoring component has a component template; the embedded point of the interface monitoring component connected includes in the closure function of the interface: The component template is used in the service layer of the interface, and the name and / or URL address and / or key value of the interface is passed into the closure function of the component template.
5. The method of claim 1, wherein monitoring the operation data of the interface comprises: Monitor the operation data of the interface through Metrics.
6. The method according to claim 1, wherein the operation data comprises one or more of occupied memory data, thread allocation data, meters data, gauges data, counters data, histograms data and timers data.
7. The method according to claim 1, after generating the interface operation report according to the operation data, the method further comprises: The operation report is transmitted to the Influxdb and Grafana systems for display.
8. An interface monitoring device, comprising: A construction module is used to obtain an interface monitoring component and upload the interface monitoring component to a server; A monitoring module, for burying the interface monitoring component in the closure function of the interface to monitor the operation data of the interface after the interface monitoring component is downloaded from the server and connected to the interface; A reporting module is used to generate an interface operation report based on the operation data.
9. An interface monitoring device, comprising: at least one processor; as well as, a memory communicatively coupled to the at least one processor; in, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to execute the interface monitoring method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the interface monitoring method according to any one of claims 1 to 7.
