CN114428706A - Interface monitoring method and device, storage medium and electronic equipment - Google Patents

Interface monitoring method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114428706A
CN114428706A CN202210011308.0A CN202210011308A CN114428706A CN 114428706 A CN114428706 A CN 114428706A CN 202210011308 A CN202210011308 A CN 202210011308A CN 114428706 A CN114428706 A CN 114428706A
Authority
CN
China
Prior art keywords
interface
target
monitoring
target interface
service
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.)
Granted
Application number
CN202210011308.0A
Other languages
Chinese (zh)
Other versions
CN114428706B (en
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.)
Qianhai Feisuan Yunzhi Software Technology Shenzhen Co ltd
Original Assignee
Qianhai Feisuan Yunzhi Software Technology Shenzhen Co ltd
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 Qianhai Feisuan Yunzhi Software Technology Shenzhen Co ltd filed Critical Qianhai Feisuan Yunzhi Software Technology Shenzhen Co ltd
Priority to CN202210011308.0A priority Critical patent/CN114428706B/en
Publication of CN114428706A publication Critical patent/CN114428706A/en
Application granted granted Critical
Publication of CN114428706B publication Critical patent/CN114428706B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to an interface monitoring method, an interface monitoring device, a storage medium and an electronic device. The method comprises the following steps: configuring monitoring parameters of a target interface aiming at the target interface to be monitored in an application program, wherein the monitoring parameters comprise a service label of the target interface and storage setting information, and the storage setting information is used for indicating a storage position where monitoring data obtained by monitoring the target interface should be stored; responding to a received interface calling instruction aiming at the target interface, and acquiring interface calling information in the running process of the target interface; generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface; and storing the target monitoring data to a storage position indicated by the monitoring parameters of the target interface. Therefore, the interface monitoring efficiency is favorably improved, the workload of developers is reduced, and the human resources are saved.

Description

Interface monitoring method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an interface monitoring method and apparatus, a storage medium, and an electronic device.
Background
In the computer software development technology, monitoring of business information associated with a computer software system interface is increasingly important. At present, for monitoring software or a program interface, after interface operation data are generally collected, a system for inquiring or analyzing service indexes is developed at a later stage to analyze the collected interface operation data, and in such a way, developers need to spend extra effort to develop an analysis system again, so that labor is wasted, and efficiency is not high.
Disclosure of Invention
The purpose of the present disclosure is to provide an interface monitoring method, apparatus, storage medium, and electronic device, which configure a service tag for an interface in advance, so that information obtained in the process of monitoring the interface will also be identified and stored by the service tag, and thus, when monitoring data is analyzed subsequently, the performance of the interface under different service tags can be analyzed directly and quickly by using the service tag as an index, which is beneficial to improving monitoring efficiency, reducing workload of developers, and saving human resources.
In order to achieve the above object, according to a first aspect of the present disclosure, there is provided an interface monitoring method, the method including:
configuring monitoring parameters of a target interface to be monitored in an application program, wherein the monitoring parameters comprise a service label of the target interface and storage setting information, and the storage setting information is used for indicating a storage position where monitoring data obtained by monitoring the target interface is stored;
responding to a received interface calling instruction aiming at the target interface, and acquiring interface calling information in the running process of the target interface;
generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface;
and storing the target monitoring data to a storage position indicated by the monitoring parameters of the target interface.
Optionally, the configuring, for a target interface to be monitored in an application program, monitoring parameters of the target interface includes:
introducing an interface tool package into an application program project where the target interface is located, wherein the interface tool package is provided with configuration items for monitoring the interface, and the configuration items at least comprise a first configuration item for configuring a service label and a second configuration item for configuring storage setting information;
and configuring the configuration item of the target interface to determine the monitoring parameters of the target interface.
Optionally, the introducing the interface toolkit into the application program project where the target interface is located includes:
transmitting the interface toolkit to a designated directory of the application program item; or,
uploading the interface tool package to a project management tool used by the application program project, and adding the dependency relationship between the interface tool package and the application program project in a project object model of the project management tool.
Optionally, the configuration items further include a third configuration item for configuring a service dictionary, where the service dictionary is used to record a correspondence between a parameter value of an interface parameter and a service meaning;
the configuring the configuration item of the target interface to determine the monitoring parameter of the target interface includes:
in response to receiving a configuration instruction for the third configuration item, acquiring at least one set of corresponding relations input by a user for the third configuration item;
and adding the at least one group of corresponding relations to the service dictionary, and adding the service dictionary to the monitoring parameters of the target interface.
Optionally, the configuration items further include a fourth configuration item for configuring and acquiring the operating environment parameters of the interface;
the configuring the configuration item of the target interface to determine the monitoring parameter of the target interface includes:
in response to receiving a configuration instruction for the fourth configuration item, acquiring an environmental parameter to be monitored, which is input by a user for the fourth configuration item;
and adding the environmental parameters to be monitored into the monitoring parameters of the target interface.
Optionally, the monitoring parameters further include a service dictionary for recording a correspondence between parameter values of the interface parameters and service meanings;
generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface, including:
converting the interface calling information according to the service dictionary to obtain a conversion result so as to convert a parameter value contained in the interface calling information into a service meaning corresponding to the parameter value;
and combining the conversion result, the interface identifier of the target interface and the service label of the target interface to obtain data serving as the target monitoring data.
Optionally, the storage location indicated by the monitoring parameter of the target interface is a target database, and the target database stores monitoring data of a plurality of interfaces;
the method further comprises the following steps:
receiving a monitoring data display instruction, wherein the monitoring data display instruction is used for indicating a target service label of data to be displayed;
according to the target service label indicated by the monitoring data display instruction, monitoring data matched with the target service label is determined from the monitoring data stored in the target database and is used as data to be displayed;
and displaying the data to be displayed through a preset display window.
According to a second aspect of the present disclosure, there is provided an interface monitoring apparatus, the apparatus comprising:
the system comprises a configuration module, a monitoring module and a processing module, wherein the configuration module is used for configuring monitoring parameters of a target interface to be monitored in an application program, the monitoring parameters comprise a service label and storage setting information of the target interface, and the storage setting information is used for indicating a storage position where monitoring data obtained by monitoring the target interface is stored;
the acquisition module is used for responding to the received interface calling instruction aiming at the target interface and acquiring interface calling information in the running process of the target interface;
the generating module is used for generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface;
and the storage module is used for storing the target monitoring data to a storage position indicated by the monitoring parameters of the target interface.
According to a third aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the methods of the first aspect.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of the first aspects.
According to the technical scheme, the monitoring parameters of the target interface are configured for the target interface to be monitored in the application program, wherein the monitoring parameters comprise a service label of the target interface and storage setting information, and the storage setting information is used for indicating a storage position where monitoring data obtained by monitoring the target interface should be stored. And responding to the received interface calling instruction aiming at the target interface, acquiring interface calling information in the running process of the target interface, generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface, and storing the target monitoring data to a storage position indicated by the monitoring parameter of the target interface. Therefore, the interfaces can be classified according to different services in advance by configuring the service tags for the target interfaces in advance, and the service tags are identified, so that information obtained in the process of monitoring the interfaces can be identified and stored by the service tags, and therefore, when monitoring data is analyzed subsequently, the performance of the interfaces under different service tags can be analyzed rapidly by directly using the service tags as indexes, the monitoring efficiency is improved, meanwhile, the development of an analysis system is not required to spend extra manpower, the workload of developers can be reduced, and the manpower resource is saved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow chart of an interface monitoring method provided according to one embodiment of the present disclosure;
FIG. 2 is a block diagram of an interface monitoring apparatus provided in accordance with one embodiment of the present disclosure;
FIG. 3 is a block diagram illustrating an electronic device in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a flowchart of an interface monitoring method provided according to an embodiment of the present disclosure. As shown in fig. 1, the method provided by the present disclosure may include steps 11 to 14.
In step 11, monitoring parameters of a target interface are configured for the target interface to be monitored in an application program.
The monitoring parameters may include a service tag and storage setting information of the target interface.
Developers can manually classify the services into different categories according to actual service conditions and service requirements, and distinguish the services by using different service labels, so that the service labels are used as identifiers for interface classification and grouping, and the subsequent analysis of monitored data is facilitated. For example, when configuring the service label of the target interface, at least one service label may be set for the target interface according to the service related to the target interface. For example, if a developer presets service tags such as a blacklist tag, a blacklist touch, and a whitelist tag, and the interface a relates to a service related to a blacklist query, the interface a may be configured with the blacklist tag and the blacklist touch.
The storage setting information is used to indicate a storage location where monitoring data obtained by monitoring the target interface should be stored, that is, a data storage device for storing the monitoring data. For example, the monitoring data obtained by monitoring the target interface can be stored in a designated third-party database. The third-party database may be infiluxdb (time sequence, event and index database), Prometheus (time sequence database), or the like.
For example, the configuration of the storage setting information may refer to the following code:
Figure BDA0003459214310000061
as can be seen, in the above code, it is specified that data is stored in the prometheus database.
In one possible embodiment, step 11 may comprise the steps of:
introducing an interface tool package into an application program project in which a target interface is positioned;
and configuring the configuration items of the target interface to determine the monitoring parameters of the target interface.
The interface tool kit can be provided with configuration items for monitoring the interface, wherein the configuration items at least comprise a first configuration item for configuring the service tag and a second configuration item for configuring the storage setting information. By way of example, the present disclosure may use the jar toolkit of monitorBiz as the interface toolkit.
That is, an interface toolkit is introduced into an application program project where a target interface is located, and the application program project is standardized through configuration items, so that the functional reusability of interface service monitoring development is improved.
For example, introducing the interface toolkit into the application program project in which the target interface is located can be implemented by the following steps:
the interface toolkit is transmitted to a specified directory of application items.
Taking the application program item where the target interface is located as a Java item, the interface toolkit may be transmitted (or copied) to the lib directory of the Java item.
For another example, introducing the interface toolkit into the application program project in which the target interface is located may be implemented as follows:
and uploading the interface tool package to a project management tool used by the application program project, and adding the dependency relationship between the interface tool package and the application program project in a project object model of the project management tool.
Illustratively, the Project management tool may be Maven, and accordingly, after uploading the interface toolkit to the Maven repository, the above-mentioned dependency relationship may be added in the Project Object Model (POM) of the application Project. Where POM is a file in the Maven project, expressed using XML, and the file name is POM.
For example, if the interface toolkit name is monitorbz.1.0.0.jar, then dependencies may be added in the pom.xml file as follows:
Figure BDA0003459214310000071
Figure BDA0003459214310000081
after the interface toolkit is introduced, the interface toolkit instance can be initialized so as to configure the configuration item of the target interface. The interface toolkit may be provided with a default configuration capable of implementing service tag statistics, for example, a default configuration provided with a service tag and storage setting information, and if the developer does not change the configuration additionally, the default configuration is directly used.
As described above, the interface toolkit is provided with a first configuration item for configuring the service tag and a second configuration item for configuring the storage setting information, both of which may be specified by a developer. The configuration of the first configuration item may be understood as a business label selected or generated by a developer for the target interface. The configuration of the second configuration item may be understood as a developer setting connection information of the target interface with a third party database to which the data is docked (e.g., specifying which database is docked).
Optionally, a reporting trigger condition for the monitored interface data may also be configured according to actual requirements, for example, reporting the monitoring data when abnormal data occurs (i.e., transmitting the monitoring data to a third-party database), or reporting the monitoring data whenever the interface is called.
In a possible implementation manner, the configuration items may further include a third configuration item for configuring a service dictionary, where the service dictionary is used for recording a correspondence between parameter values of the interface parameters and service meanings. Correspondingly, configuring the configuration item of the target interface to determine the monitoring parameter of the target interface may include the following steps:
in response to receiving a configuration instruction for a third configuration item, acquiring at least one set of corresponding relations input by a user for the third configuration item;
and adding at least one group of corresponding relations to the service dictionary, and adding the service dictionary to the monitoring parameters of the target interface.
That is to say, the developer may, according to the actual service requirement, normalize the parameter values of the dictionary entries in the service dictionary, and normalize and agree the service meanings of the parameter values of the dictionary entries, thereby forming the service dictionary for recording the correspondence between the parameter values of the interface parameters (i.e., the parameter values of the dictionary entries in the service dictionary) and the service meanings. In the disclosure, a multi-choice extensible parameter, for example, a dictionary entry list of the service dictionary may be provided to flexibly extend the service-related monitoring content, and the dictionary entry list of the service dictionary may include, for example, the number of orders, the validity of the orders, and the like.
For example, if the body param _ blackType represents an interface for querying whether the user is a blacklist, the returned value 1 represents that the query object is located in the blacklist, and the returned value 0 represents that the query object is not blacklisted, so the parameter value 1 of the interface of the body param _ blackType corresponds to a business meaning of "the query object is located in the blacklist", and the parameter value 0 of the body param _ blackType corresponds to a business meaning of "the query object is not blacklisted". Based on this, the correspondence between the parameter values and the business meanings can be added to the business dictionary.
By the method, the length of the stored data can be effectively reduced through parameter value setting, and the business meaning can be accurately determined through the corresponding relation.
In another possible implementation, the configuring item may further include a fourth configuring item for configuring and acquiring the operating environment parameter of the interface, and accordingly, configuring the configuring item of the target interface to determine the monitoring parameter of the target interface may include the following steps:
in response to receiving a configuration instruction for the fourth configuration item, acquiring an environmental parameter to be monitored, which is input by a user for the fourth configuration item;
and adding the environmental parameters to be monitored into the monitoring parameters of the target interface.
That is to say, the environmental parameters to be monitored can be configured by configuring the fourth configuration item in advance, so that in the monitoring process, the relevant environmental parameters of the target interface during operation can be obtained, and subsequent data analysis is facilitated. The environment parameter may be environment information of a physical device in which the application program runs. By way of example, the environment parameter may be host network mac code, program process number, or the like.
In step 12, in response to receiving an interface call instruction for the target interface, interface call information in the running process of the target interface is acquired.
The interface calling information can reflect the calling condition of the target interface during operation, such as calling failure, calling success and the like. That is, in the process of calling the target interface, the relevant data of the operation of the target interface is monitored as the interface calling information.
In step 13, target monitoring data corresponding to the interface call instruction is generated according to the interface call information, the interface identifier of the target interface and the service tag of the target interface.
And the interface identifier of the target interface is used for uniquely identifying the target interface. Illustratively, the interface identification of the target interface may be randomly generated or may be manually configured.
In one possible implementation, the interface calling information, the interface identifier of the target interface, and the service tag of the target interface may be associated, and the associated result may be used as the target monitoring data. For example, the interface calling information, the interface identifier of the target interface, and the service tag of the target interface may be combined into new data as the target monitoring data.
In another possible embodiment, the monitoring parameters may further include a service dictionary for recording correspondence between parameter values of the interface parameters and service meanings, and accordingly, step 13 may include the following steps:
converting the interface calling information according to the service dictionary to obtain a conversion result so as to convert a parameter value contained in the interface calling information into a service meaning corresponding to the parameter value;
and combining the conversion result, the interface identifier of the target interface and the service label of the target interface to obtain data serving as target monitoring data.
That is, before uploading to the database, the interface call information may be converted, the parameter value whose meaning representation is not obvious is converted into the actual business meaning, and then the actual business meaning is combined with the interface identifier of the target interface and the business label of the target interface, so that the accurate business meaning can be provided in the target monitoring data, and the subsequent data analysis is facilitated.
In another possible embodiment, the monitoring parameter may further include an environmental parameter to be monitored, and accordingly, step 13 may include the following steps:
acquiring environmental information corresponding to environmental parameters needing to be monitored in the running process of a target interface;
and combining the interface calling information, the environment information, the interface identifier of the target interface and the service label of the target interface to obtain data serving as target monitoring data.
That is to say, in the process of monitoring the target interface, information related to the operating environment of the target interface can be included in the target monitoring data together, so that subsequent data analysis is facilitated.
In step 14, the target monitoring data is stored to the storage location indicated by the monitoring parameters of the target interface.
And after the target monitoring data is obtained, storing the target monitoring data, wherein the storage position is the storage position configured by the monitoring parameters.
According to the technical scheme, the monitoring parameters of the target interface are configured for the target interface to be monitored in the application program, wherein the monitoring parameters comprise a service label of the target interface and storage setting information, and the storage setting information is used for indicating a storage position where monitoring data obtained by monitoring the target interface should be stored. And responding to the received interface calling instruction aiming at the target interface, acquiring interface calling information in the running process of the target interface, generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface, and storing the target monitoring data to a storage position indicated by the monitoring parameter of the target interface. Therefore, the interfaces can be classified according to different services in advance by configuring the service tags for the target interfaces in advance, and the service tags are identified, so that information obtained in the process of monitoring the interfaces can be identified and stored by the service tags, and therefore, when monitoring data is analyzed subsequently, the performance of the interfaces under different service tags can be analyzed rapidly by directly using the service tags as indexes, the monitoring efficiency is improved, meanwhile, the development of an analysis system is not required to spend extra manpower, the workload of developers can be reduced, and the manpower resource is saved.
As described above, the storage location indicated by the monitoring parameters of the target interface may be a third party database, i.e., a target database. Accordingly, monitoring data of a plurality of interfaces to be monitored can be stored in the target database, so that the collected monitoring data can be integrated and analyzed through the target database. Accordingly, the method provided by the present disclosure may further comprise the steps of:
receiving a monitoring data display instruction;
according to the target service label indicated by the monitoring data display instruction, monitoring data matched with the target service label is determined from the monitoring data stored in the target database and is used as data to be displayed;
and displaying the data to be displayed through a preset display window.
The monitoring data display instruction can indicate a target service label of the data to be displayed.
That is to say, with the service tag as a query condition, the monitoring data conforming to the target service tag is screened out from the monitoring data stored in the target database, and is used as the data to be displayed, and the data is visually displayed through a preset display window, so that developers can visually monitor the application program interface conveniently.
For example, the monitoring data of each interface can be analyzed and displayed in real time through the open-source time sequence database display end. Taking a target database as Prometheus as an example, a PQL statement can be used, a service tag is used as a condition to query monitoring data, and the queried data to be displayed can be visually displayed through a visualization tool Grafana.
For another example, the monitorBiz server program may perform visual display of the monitoring data, such as displaying the monitoring chart according to the parameter values of the dictionary entry (i.e., the parameter values of the interface parameters) by automatic classification, and displaying a real-time curve of the monitoring data, for example, an order real-time curve, an order payment real-time curve, an order completion real-time curve, an accumulated order quantity curve, an accumulated payment quantity curve, and the like.
Based on the same inventive concept, the present disclosure also provides an interface monitoring apparatus, as shown in fig. 2, the apparatus 10 includes:
a configuration module 100, configured to configure, for a target interface to be monitored in an application program, monitoring parameters of the target interface, where the monitoring parameters include a service tag of the target interface and storage setting information, and the storage setting information is used to indicate a storage location where monitoring data obtained by monitoring the target interface should be stored;
an obtaining module 200, configured to obtain, in response to receiving an interface call instruction for the target interface, interface call information in an operation process of the target interface;
a generating module 300, configured to generate target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface, and the service tag of the target interface;
a storage module 400, configured to store the target monitoring data to a storage location indicated by the monitoring parameter of the target interface.
Optionally, the configuration module 100 includes:
the import submodule is used for importing an interface toolkit into an application program project where the target interface is located, the interface toolkit is provided with configuration items for monitoring the interface, and the configuration items at least comprise a first configuration item for configuring a service label and a second configuration item for configuring storage setting information;
and the configuration submodule is used for configuring the configuration items of the target interface so as to determine the monitoring parameters of the target interface.
Optionally, the import sub-module comprises:
the transmission submodule is used for transmitting the interface tool package to a specified catalogue of the application program project; or,
and the processing submodule uploads the interface tool package to a project management tool used by the application program project and adds the dependency relationship between the interface tool package and the application program project in a project object model of the project management tool.
Optionally, the configuration items further include a third configuration item for configuring a service dictionary, where the service dictionary is used to record a correspondence between a parameter value of an interface parameter and a service meaning;
the configuration sub-module includes:
the first obtaining sub-module is used for responding to the received configuration instruction aiming at the third configuration item, and obtaining at least one group of corresponding relations input by a user aiming at the third configuration item;
and the first adding submodule is used for adding the at least one group of corresponding relations to the service dictionary and adding the service dictionary to the monitoring parameters of the target interface.
Optionally, the configuration items further include a fourth configuration item for configuring and acquiring the operating environment parameters of the interface;
the configuration sub-module includes:
the second obtaining submodule is used for responding to the received configuration instruction aiming at the fourth configuration item, and obtaining the environmental parameters which are input by the user and need to be monitored aiming at the fourth configuration item;
and the second adding submodule is used for adding the environmental parameters to be monitored into the monitoring parameters of the target interface.
Optionally, the monitoring parameters further include a service dictionary for recording a correspondence between parameter values of the interface parameters and service meanings;
the generating module 300 includes:
the conversion submodule is used for converting the interface calling information according to the service dictionary to obtain a conversion result so as to convert a parameter value contained in the interface calling information into a service meaning corresponding to the parameter value;
and the determining submodule is used for combining the conversion result, the interface identifier of the target interface and the service label of the target interface to obtain data serving as the target monitoring data.
Optionally, the storage location indicated by the monitoring parameter of the target interface is a target database, and the target database stores monitoring data of a plurality of interfaces;
the apparatus 10 further comprises:
the receiving module is used for receiving a monitoring data display instruction, and the monitoring data display instruction is used for indicating a target service label of data to be displayed;
the determining module is used for determining monitoring data matched with the target service label from the monitoring data stored in the target database according to the target service label indicated by the monitoring data display instruction, and the monitoring data is used as data to be displayed;
and the display module is used for displaying the data to be displayed through a preset display window.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 3 is a block diagram illustrating an electronic device 700 according to an example embodiment. As shown in fig. 3, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the interface monitoring method. The memory 702 is used to store various types of data to support operation at the electronic device 700, such as instructions for any application or method operating on the electronic device 700 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and the like. The Memory 702 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia components 703 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 702 or transmitted through the communication component 705. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 705 may thus include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described interface monitoring method.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the interface monitoring method described above is also provided. For example, the computer readable storage medium may be the memory 702 described above including program instructions that are executable by the processor 701 of the electronic device 700 to perform the interface monitoring method described above.
Fig. 4 is a block diagram illustrating an electronic device 1900 according to an example embodiment. For example, the electronic device 1900 may be provided as a server. Referring to fig. 4, an electronic device 1900 includes a processor 1922, which may be one or more in number, and a memory 1932 for storing computer programs executable by the processor 1922. The computer program stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processor 1922 may be configured to execute the computer program to perform the interface monitoring method described above.
Additionally, the electronic device 1900 may also include a power component 1926 and a communication component 1950, the power component 1926 may be configured to perform power management for the electronic device 1900, and the communication component 1950 may be configured to enable communication for the electronic device 1900, e.g., wired or wireless communication. In addition, the electronic device 1900 may also include input/output (I/O) interfaces 1958. The electronic device 1900 may operate based on an operating system, such as Windows Server, stored in memory 1932TM,Mac OS XTM,UnixTM,LinuxTMAnd so on.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the interface monitoring method described above is also provided. For example, the non-transitory computer readable storage medium may be the memory 1932 described above that includes program instructions that are executable by the processor 1922 of the electronic device 1900 to perform the interface monitoring method described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned interface monitoring method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the foregoing embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. An interface monitoring method, the method comprising:
configuring monitoring parameters of a target interface to be monitored in an application program, wherein the monitoring parameters comprise a service label of the target interface and storage setting information, and the storage setting information is used for indicating a storage position where monitoring data obtained by monitoring the target interface is stored;
responding to a received interface calling instruction aiming at the target interface, and acquiring interface calling information in the running process of the target interface;
generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface;
and storing the target monitoring data to a storage position indicated by the monitoring parameters of the target interface.
2. The method according to claim 1, wherein the configuring the monitoring parameters of the target interface for the target interface to be monitored in the application program comprises:
introducing an interface tool package into an application program project where the target interface is located, wherein the interface tool package is provided with configuration items for monitoring the interface, and the configuration items at least comprise a first configuration item for configuring a service label and a second configuration item for configuring storage setting information;
and configuring the configuration item of the target interface to determine the monitoring parameters of the target interface.
3. The method of claim 2, wherein the introducing the interface toolkit into the application program project in which the target interface is located comprises:
transmitting the interface toolkit to a designated directory of the application program item; or,
uploading the interface tool package to a project management tool used by the application program project, and adding the dependency relationship between the interface tool package and the application program project in a project object model of the project management tool.
4. The method according to claim 2, wherein the configuration items further comprise a third configuration item for configuring a service dictionary, wherein the service dictionary is used for recording the correspondence between the parameter values of the interface parameters and the service meanings;
the configuring the configuration item of the target interface to determine the monitoring parameter of the target interface includes:
in response to receiving a configuration instruction for the third configuration item, acquiring at least one set of corresponding relations input by a user for the third configuration item;
and adding the at least one group of corresponding relations to the service dictionary, and adding the service dictionary to the monitoring parameters of the target interface.
5. The method according to claim 2, wherein the configuration items further comprise a fourth configuration item for configuring and acquiring interface operating environment parameters;
the configuring the configuration item of the target interface to determine the monitoring parameter of the target interface includes:
in response to receiving a configuration instruction for the fourth configuration item, acquiring an environmental parameter to be monitored, which is input by a user for the fourth configuration item;
and adding the environmental parameters to be monitored into the monitoring parameters of the target interface.
6. The method of claim 1, wherein the monitoring parameters further comprise a service dictionary for recording correspondence between parameter values of the interface parameters and service meanings;
generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface, including:
converting the interface calling information according to the service dictionary to obtain a conversion result so as to convert a parameter value contained in the interface calling information into a service meaning corresponding to the parameter value;
and combining the conversion result, the interface identifier of the target interface and the service label of the target interface to obtain data serving as the target monitoring data.
7. The method according to claim 1, wherein the storage location indicated by the monitoring parameter of the target interface is a target database, and the target database stores therein monitoring data of a plurality of interfaces;
the method further comprises the following steps:
receiving a monitoring data display instruction, wherein the monitoring data display instruction is used for indicating a target service label of data to be displayed;
according to the target service label indicated by the monitoring data display instruction, monitoring data matched with the target service label is determined from the monitoring data stored in the target database and is used as data to be displayed;
and displaying the data to be displayed through a preset display window.
8. An interface monitoring apparatus, the apparatus comprising:
the system comprises a configuration module, a monitoring module and a monitoring module, wherein the configuration module is used for configuring monitoring parameters of a target interface aiming at the target interface to be monitored in an application program, the monitoring parameters comprise a service label of the target interface and storage setting information, and the storage setting information is used for indicating a storage position where monitoring data obtained by monitoring the target interface should be stored;
the acquisition module is used for responding to the received interface calling instruction aiming at the target interface and acquiring interface calling information in the running process of the target interface;
the generating module is used for generating target monitoring data corresponding to the interface calling instruction according to the interface calling information, the interface identifier of the target interface and the service label of the target interface;
and the storage module is used for storing the target monitoring data to a storage position indicated by the monitoring parameters of the target interface.
9. A non-transitory computer readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-7.
CN202210011308.0A 2022-01-06 2022-01-06 Interface monitoring method and device, storage medium and electronic equipment Active CN114428706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210011308.0A CN114428706B (en) 2022-01-06 2022-01-06 Interface monitoring method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210011308.0A CN114428706B (en) 2022-01-06 2022-01-06 Interface monitoring method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114428706A true CN114428706A (en) 2022-05-03
CN114428706B CN114428706B (en) 2022-11-22

Family

ID=81311801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210011308.0A Active CN114428706B (en) 2022-01-06 2022-01-06 Interface monitoring method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114428706B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117411929A (en) * 2023-12-14 2024-01-16 卓望数码技术(深圳)有限公司 Business process monitoring method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721941B1 (en) * 1996-08-27 2004-04-13 Compuware Corporation Collection of timing and coverage data through a debugging interface
TWI575401B (en) * 2015-11-12 2017-03-21 財團法人資訊工業策進會 Mobile device and an monitoring method suitable for mobile device
CN109597735A (en) * 2018-11-30 2019-04-09 首约科技(北京)有限公司 Monitoring method, system and storage medium
CN110968479A (en) * 2019-11-20 2020-04-07 北京宝兰德软件股份有限公司 Business-level full-link monitoring method for application program and server
CN111724063A (en) * 2020-06-19 2020-09-29 上海商汤智能科技有限公司 Business data processing method and device, electronic equipment and storage medium
CN111782481A (en) * 2020-07-15 2020-10-16 五色石(杭州)数据技术有限公司 Universal data interface monitoring system and monitoring method
CN112711515A (en) * 2021-01-20 2021-04-27 维沃移动通信有限公司 Real-time monitoring method and device and electronic equipment
CN113760641A (en) * 2021-01-08 2021-12-07 北京沃东天骏信息技术有限公司 Service monitoring method, device, computer system and computer readable storage medium
CN113867197A (en) * 2021-09-16 2021-12-31 浪潮云信息技术股份公司 Prometheus-based cloud data center instance monitoring method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19828256A1 (en) * 1998-06-25 1999-12-30 Bayer Ag Antifouling agents, a process for their production and use, and antifouling coatings made therefrom

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721941B1 (en) * 1996-08-27 2004-04-13 Compuware Corporation Collection of timing and coverage data through a debugging interface
TWI575401B (en) * 2015-11-12 2017-03-21 財團法人資訊工業策進會 Mobile device and an monitoring method suitable for mobile device
CN109597735A (en) * 2018-11-30 2019-04-09 首约科技(北京)有限公司 Monitoring method, system and storage medium
CN110968479A (en) * 2019-11-20 2020-04-07 北京宝兰德软件股份有限公司 Business-level full-link monitoring method for application program and server
CN111724063A (en) * 2020-06-19 2020-09-29 上海商汤智能科技有限公司 Business data processing method and device, electronic equipment and storage medium
CN111782481A (en) * 2020-07-15 2020-10-16 五色石(杭州)数据技术有限公司 Universal data interface monitoring system and monitoring method
CN113760641A (en) * 2021-01-08 2021-12-07 北京沃东天骏信息技术有限公司 Service monitoring method, device, computer system and computer readable storage medium
CN112711515A (en) * 2021-01-20 2021-04-27 维沃移动通信有限公司 Real-time monitoring method and device and electronic equipment
CN113867197A (en) * 2021-09-16 2021-12-31 浪潮云信息技术股份公司 Prometheus-based cloud data center instance monitoring method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ANKORA: "prometheus自定义监控:监控接口的实时调用情况", 《HTTPS://BLOG.CSDN.NET/ANKORA/ARTICLE/DETAILS/116600773?UTM_MED…GG_NEW_RANK&UTM_TERM=PROMETHEUS监控业务接⼝ &SPM=1000.2123.3001.4430》 *
SUNGCHAN: "grafna监控Java接口_Grafana+Prometheus快速搭建监控平台", 《HTTPS://BLOG.CSDN.NET/WEIXIN_33437929/ARTICLE/DETAILS/11475391…GG_NEW_RANK&UTM_TERM=PROMETHEUS监控业务接⼝&SPM=1000.2123.3001.4430》 *
尚洁: "基于Django的测试工具平台的设计与实现", 《中国优秀硕士学位论文全文数据库(电子期刊)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117411929A (en) * 2023-12-14 2024-01-16 卓望数码技术(深圳)有限公司 Business process monitoring method, device, equipment and storage medium
CN117411929B (en) * 2023-12-14 2024-03-15 卓望数码技术(深圳)有限公司 Business process monitoring method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114428706B (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN107688530B (en) Software testing method and device
CN111026645B (en) User interface automatic test method and device, storage medium and electronic equipment
US20140181262A1 (en) Use of internet information services logging to collect user information in an asynchronous manner
CN111654495B (en) Method, apparatus, device and storage medium for determining traffic generation source
CN111190573A (en) Application program point burying method and device and electronic equipment
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN113448854A (en) Regression testing method and device
CN105577472A (en) Data acquisition test method and device
CN114428706B (en) Interface monitoring method and device, storage medium and electronic equipment
CN113760697A (en) Interface testing method and device, electronic equipment and storage medium
CN112783756A (en) Automatic test method, terminal, system and storage medium
CN110351131B (en) Monitoring method and device for distributed link and electronic equipment
CN114172978B (en) Multi-protocol equipment access method and related device
CN113688134B (en) Visual variable management method, system and equipment based on multidimensional data
CN115934199A (en) Service performance monitoring tool, method, device and medium
CN109240916B (en) Information output control method, information output control device and computer readable storage medium
CN114443905A (en) Interface document updating method and device, electronic equipment and readable storage medium
CN117435423A (en) Service processing method and device, electronic equipment and storage medium
CN110309028B (en) Monitoring information acquisition method, service monitoring method, device and system
CN116737535A (en) Interface test method, device, computer equipment and storage medium
CN113377610B (en) Performance monitoring method, device, computer equipment and storage medium
CN115203306A (en) Data exporting method and device, computer equipment and readable storage medium
CN110309062B (en) Use case generation method, device, electronic equipment and storage medium
CN114968696A (en) Index monitoring method, electronic equipment and chip system
CN113760315A (en) Method and device for testing system

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
GR01 Patent grant
GR01 Patent grant