Method for automatically integrating data acquisition probe for containerized front-end application
By installing monitoring and burying services in containerized front-end H5 applications, monitoring file system changes, and using container penetration technology to add probes, the problem of automatic burying of probes in front-end H5 applications in the existing technology is solved, and the performance monitoring platform is realized. Efficient access and strong support.
Patent Information
- Application Number
- CN202311186935.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-14
- Publication Date
- 2024-10-29
AI Technical Summary
In the existing technology, the application performance monitoring platform requires the assistance of the business system to transform when adding monitoring probes to front-end H5 applications. The process is complex and difficult, and it fails to effectively solve the problem of automatic buried points of front-end H5 application probes, resulting in performance monitoring The system is difficult to implement and costly to access.
By installing monitoring and burying services, monitoring file system changes, intercepting container startup, entering the target container, using container penetration technology, and adding front-end probes, automatic probe burying of containerized front-end applications is realized. Specific steps include installing a buried service program as a daemon on the server, monitoring file system changes of containerized applications, using container penetration technology to traverse the image isolation mechanism and integrating front-end probe js files into the system through html-script tags.
It effectively solves the problems of difficult implementation and high access cost of probes on the performance monitoring platform, provides automated and powerful technical support for the performance monitoring platform, and simplifies the probe access process.
Smart Images

Figure CN118860818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of application performance monitoring, and in particular to a method for automatically integrating data collection probes for containerized front-end H5 applications. Background Art
[0002] In the prior art, during the implementation of the application performance monitoring platform, it is necessary to add monitoring probes to the front-end H5 application to be monitored. Usually, the business system needs to assist in the transformation. The process is complicated and difficult to implement. However, there is no effective method in the prior art to solve the problem of automatic tracking of front-end H5 application probes. Therefore, when a large number of systems require performance monitoring functions, the workload is very large. Enterprises cannot accept the cost of probe access, which makes it difficult to implement a complete application performance monitoring system. Summary of the invention
[0003] The present invention provides a method for automatically integrating data collection for containerized front-end applications.
[0004] A method for automatically integrating a data collection probe for a containerized front-end application, comprising: S1 Install the monitoring tracking service: Install the tracking service program on the server where the container is located; S2 monitors file system changes and intercepts container startup: Probe tracking programs are implanted during container pulling and startup; S3 enters the target container: container penetration technology is used to traverse the image isolation mechanism; S4 adds front-end probes: reads files to introduce front-end probes and completes probe tracking.
[0005] Specifically, the installation monitoring tracking service includes an automatic tracking program as a system daemon process, which runs when the system starts.
[0006] Specifically, monitoring file system changes to intercept container startup includes monitoring file system changes generated by executing image pulling and image running steps, and monitoring the pulling and startup process of the containerized application.
[0007] Specifically, the target container is entered by accessing K8S-API to obtain information about all containers running in the current server, and Linux container penetration technology is used to penetrate cgroups and namespace isolation to enter the container space.
[0008] Specifically, the adding of the front-end probe includes the probe being a js file, and the file is integrated into the system through an html-script tag.
[0009] Beneficial effects of the present invention: The present invention uses file system monitors and container penetration technology to automatically embed probes in containerized front-end H5 applications, effectively solving the problems of difficult implementation and high access cost of performance monitoring platform probes, and providing strong technical support for the performance monitoring platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a structural diagram of the system modules provided by the present invention.
[0011] Figure 2 The system flow chart provided by the present invention.
[0012] Figure 3 A step diagram is added to the probe provided by the present invention. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical features and advantages of the present invention clearer, the technical solutions in the present invention are now described according to the accompanying drawings. The examples described are part of the examples of the present invention, not all of them. Based on the examples in the present invention, all other embodiments obtained by ordinary skilled workers in the field without creative work are within the scope of protection of the present invention.
[0014] like Figure 1 As shown, a method for automatically integrating data collection probes for containerized front-end H5 applications includes: Monitoring tracking services, including front-end probe tracking programs; Penetrate the vessel to implant the probe using a vessel penetration technique; The probe file is integrated into the system using tags and the program installation is run after reading the file.
[0015] Specifically, when monitoring the tracking service, first install the tracking service program on the server where the container that needs to configure automatic tracking is located, and use it as a system daemon process to run when the system starts.
[0016] First, if Figure 2 As shown, the process of monitoring file system changes and intercepting container startup events includes: in the process of starting the containerized service, the file system will change when executing the two steps of image pulling and image running. For example, in the process of pulling the image, a directory and file will be created in the specified location of the specified file system. In the process of image running, the image file will be copied to the specified directory. The automatic tracking service monitors the file system changes to achieve the purpose of monitoring the pulling and starting process of the containerized application. In the process of container pulling and starting, the front-end H5 probe tracking program is placed in the container.
[0017] Secondly, if Figure 3As shown, the process of using container penetration technology to enter the target container and add a front-end H5 probe includes: using container penetration technology to enter the target container. The containerized service uses Linux's process isolation technology to restrict the access rights of the container. Because if you want to add a front-end H5 probe to the target container, you must penetrate the image isolation mechanism to enter the target container. Linux provides a method to penetrate this isolation mechanism while performing process isolation.
[0018] Furthermore, the process of using container penetration technology to enter the target container is as follows: obtain information about all containers running in the current server by accessing the K8S-API, and use the Linux container penetration technology to penetrate cgroups and namespace isolation, so that after entering the target container space, the implantation program can be run in the target container.
[0019] Furthermore, the process of adding a probe is to integrate the js file of the front-end H5 probe through the html-script tag. After the container penetrates and obtains the target container permissions, the probe tracking program is run to read the html file of the front-end H5 application. A script tag is added to the head of the html file to introduce the front-end H5 probe, thereby realizing automatic tracking of the front-end H5 application probe.
Claims
1. A method for automatically integrating data collection probes for containerized front-end applications, characterized in that: include: S1 Install the monitoring tracking service: Install the tracking service program on the server where the container is located; S2 monitors file system changes and intercepts container startup: Probe tracking programs are implanted during container pulling and startup; S3 enters the target container: container penetration technology is used to traverse the image isolation mechanism; S4 adds front-end probes: reads files to introduce front-end probes and completes probe tracking.
2. A method for automatically integrating data collection probes for containerized front-end applications according to claim 1, characterized in that: The installation monitoring tracking service includes an automatic tracking program as a system daemon process, which runs when the system starts.
3. A method for automatically integrating data collection probes for containerized front-end applications according to claim 1, characterized in that: The monitoring of file system changes and intercepting container startup includes monitoring file system changes generated by executing image pulling and image running steps, and monitoring the pulling and startup process of the containerized application.
4. The method for automatically integrating data collection probes for containerized front-end applications according to claim 1, characterized in that: The target container is entered by accessing K8S-API to obtain information about all containers running in the current server, and Linux container penetration technology is used to penetrate cgroups and namespace isolation to enter the container space.
5. The method for automatically integrating data collection probes for containerized front-end applications according to claim 1, characterized in that: The adding of the front-end probe includes the probe being a js file, and the file is integrated into the system through an html-script tag.
