CN107977300A - A kind of request tracing method and device - Google Patents

A kind of request tracing method and device Download PDF

Info

Publication number
CN107977300A
CN107977300A CN201711085571.XA CN201711085571A CN107977300A CN 107977300 A CN107977300 A CN 107977300A CN 201711085571 A CN201711085571 A CN 201711085571A CN 107977300 A CN107977300 A CN 107977300A
Authority
CN
China
Prior art keywords
request
tracing
service
time
relevant information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711085571.XA
Other languages
Chinese (zh)
Inventor
仲崇庆
高隆林
赵欣
翟鲁超
刘永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CVIC Software Engineering Co Ltd
Original Assignee
CVIC Software Engineering 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 CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN201711085571.XA priority Critical patent/CN107977300A/en
Publication of CN107977300A publication Critical patent/CN107977300A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program

Landscapes

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

Abstract

The invention discloses a kind of request tracing method, including:Request tracing service is opened for special services;The request tracing service is run, the request of special services described in real-time tracing;Preserve the relevant information of the request.Method provided by the invention, by opening request tracing service for special services, the request of the real-time tracing special services, and preserve the relevant information of request, complete request tracing service can be provided, all requests including failure request and the relevant information of successful request of corresponding with service are preserved, so that user analyzes the operating parameter of these requests as needed, so as to find that system bottleneck, optimization system performance provide basis.In addition, the present invention also provides a kind of request tracing device.

Description

A kind of request tracing method and device
Technical field
The present invention relates to application server field, more particularly to a kind of request tracing method and device.
Background technology
Application server is generally used for the server for providing running environment for application program, service being provided for component.When should With when something goes wrong, to help application developer quick positioning question, questions and prospect is found, request tracing function is come into being.
Request tracing provides following function for servlet request events, is helped by recording more than the request of given threshold value The application program for helping user's detection slowly to run, the data that recorded can help user to solve the application bottleneck being likely to occur.
At present, Microsoft IIS (Internet Information Services, Internet Information Server) provides failure Request tracing function, the tracking event of the function cache request, flushes to the request tracking event of caching when asking failure Preserved in disk.
However, constantly expanding with the scale of application program, application server number of requests to be treated is also continuous Increase, user need the operating parameters such as response time in various components of the analysis request in server, execution state, so as to System bottleneck, optimization system performance are found in time.The Scout service of failure request is only provided in the prior art, it is difficult to meets user Needs.
Therefore, how to provide a kind of method and device that can provide complete request tracing service is people in the art The current problem to be solved of member.
The content of the invention
The object of the present invention is to provide a kind of request tracing method, complete request tracing can be realized;The present invention's is another One purpose is to provide a kind of request tracing device, for providing complete request tracing service.
In order to solve the above technical problems, the present invention provides a kind of request tracing method, based on application server, including:
Request tracing service is opened for special services;
The request tracing service is run, the request of special services described in real-time tracing;
Preserve the relevant information of the request.
Preferably, the detailed process that request tracing service is opened for special services includes:
The server category of the special services realizes the application programming interface for being used for making requests on Scout service;
For the server category registration request Scout service and related Backend parameter is set, after the completion of, the special services Request tracing service open.
Preferably, the relevant information includes:
The request time started, end time, EJB methods entry time, post-set time, pass through the SQL statement of JDBC The beginning and ending time of calling, JTA transaction start times, end time.
Preferably, after running the request tracing service, the method is further included:
Whether the request processing time for the request for judging to receive exceeds default time threshold, if exceeding, institute Request failure is stated, if without departing from, it is described to ask successfully, and will determine that result is preserved as a part for the relevant information.
Preferably, the registration request Scout service is realized to the related Backend parameter of the setting by explaining order.
Preferably, further comprise:
Generated according to the relevant information and report and stored.
In order to solve the above technical problems, present invention also offers a kind of request tracing device, based on application server, bag Include:
Opening unit is serviced, for opening request tracing service for special services;
Real-time tracing unit, for running the request tracing service, spy described in the request tracing service real-time tracing Surely the request serviced;
Information holding unit, for preserving the relevant information of the request.
Preferably, further comprise:
Threshold setting unit, for setting time threshold for described device;Described information storage unit may determine that reception Whether the request processing time for the request arrived exceeds the time threshold, if exceeding, the request failure, if not surpassing Go out, then it is described to ask successfully, and will determine that result is preserved as a part for the relevant information.
Preferably, further comprise:
Report generation unit, reports and is stored for being generated according to the relevant information.
The present invention provides a kind of request tracing method, by opening request tracing service, real-time tracing for special services The request of the special services, and the relevant information of request is preserved, complete request tracing service can be provided, preserve corresponding with service All requests including failure request and the relevant information of successful request, so as to user analyze as needed these request fortune Row parameter, so as to find that system bottleneck, optimization system performance provide basis.In addition, the present invention also provides a kind of request tracing Device, it may have above-mentioned beneficial effect, details are not described herein.
Brief description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, below will be to institute in the prior art and embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, drawings in the following description are only some implementations of the present invention Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of flow chart of request tracing method provided by the invention;
Fig. 2 is a kind of flow chart of embodiment of request tracing method provided by the invention;
Fig. 3 is a kind of structure diagram of request tracing device provided by the invention.
Embodiment
The core of the present invention is to provide a kind of request tracing method that can realize complete request tracing.The present invention's is another One core is to provide a kind of request tracing device based on above-mentioned request tracing method.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art All other embodiments obtained without making creative work, belong to the scope of protection of the invention.
The present invention provides a kind of request tracing method, and incorporated by reference to Fig. 1, Fig. 1 is a kind of request tracing provided by the invention The flow chart of method, including:
Step s1:Request tracing service is opened for special services;
Step s2:Run request tracing service, the request of real-time tracing special services;
Step s3:Preserve the relevant information of request.
In a kind of embodiment of the above method, the specific implementation process of step s1 is:
Step s11:The server category of special services realizes the application programming interface for being used for making requests on Scout service;
Step s12:For server category registration request Scout service and related Backend parameter is set, after the completion of, special services Request tracing service open.
It should be noted that the server category that special services at this time realize above-mentioned programming interface for referring to is corresponding Service.Above-mentioned Backend parameter include the enabled enable of request tracing service, operational objective target, tracking chronomere unit, Time threshold value etc. is followed the trail of, the default value of parameter enable is FALSE, for being turned on and off request tracing service, is passed through The value of enable is set to open request tracing service for TRUE;Operational objective target is used to select the target of operation to be domain or reality Example, its default value is domain;Time threshold value and chronomere unit of the threshold value in request tracing etc..Certainly, after above-mentioned Platform parameter is not limited only to above-mentioned parameter, and user can be arranged as required to other specification.
It is understood that in this embodiment, following the trail of the service of request if necessary, user is only needed for the clothes Corresponding server category of being engaged in realizes an application programming interface for being used for request tracing, is needing to open the request of the service During tracking, registered.Do not have to restart application server in configuration process, it is easy to operate, it is user-friendly.Certainly, Other modes can also be used to open request tracing service, service opening ways have no effect on the realization of the present invention.
In a kind of preferred embodiment provided by the invention, after operation request tracing service, method further comprises:
Step s4:Whether the request processing time for the request for judging to receive exceeds default time threshold, if exceeding, Request failure, if without departing from ask successfully, and will determine that a part of preservation of the result as relevant information.
It should be noted that above-mentioned steps carry out after step s3, only it is the implementation in the present embodiment, at other Embodiment in, can first carry out the preservation that step s3 is completed in the judgement in step s4 again.The order of step s3 and step s4 is simultaneously The realization of the present invention is not influenced.
Above-mentioned default time threshold is that user is specifically set according to requirement of the concrete application scene to the response time, no The time threshold of same application scenarios can be different, this has no effect on the realization of the present invention.
It is understood that judging whether request fails, and result is preserved, user can intuitively distinguish successful request And failure request, it is convenient to carry out subsequent analysis.
Referring to Fig. 2, Fig. 2 is a kind of flow chart of embodiment of request tracing method provided by the invention.
Further, registration request Scout service is realized to the related Backend parameter of setting by explaining order.
For example it is server category registration request Scout service that user can be explained by@Service, is noted by@Param Solution imports related Backend parameter, such as request tracing service enabled enable, operational objective target, tracking chronomere unit, Follow the trail of the Backend parameters such as time threshold value, it should be noted that the parameter of the Backend parameter meaning in the application is included but not Above-mentioned parameter is only limitted to, can be configured according to user demand selection parameter.
More specifically, for one is explained the server category for registering request tracing service by@Service, When needing to open request tracing, explained by@Param and be arranged to the value of the enabled parameter enable of its request tracing service TRUE, similarly, it is necessary to during turn-off request Scout service, FALSE is arranged to by parameter enable values.
It is understood that user carries out the relevant configuration of server in a manner of explaining, and it is easy to operate, avoid the need for using Server is restarted at family, is user-friendly.
In a kind of embodiment provided by the invention, the relevant information for the request that this method preserves includes:Request starts Time, end time, EJB (Enterprise JavaBean EJB, enterprise java bean) method entry time, when exiting Between, during the start-stop called by the SQL statement of JDBC (connection of Java Data Base Connectivity, java database) Between, JTA (Java affairs API) transaction start time, end time.
It is understood that method provided by the invention preserves above- mentioned information so that user checks, and with regard to these information into Row analysis, to find system bottleneck, optimization system performance in time.
Further, the present invention also provides a kind of preferred embodiment, further comprise:
Report is generated according to relevant information to be stored.
It is understood that in this approach, further request relevant information is arranged and analyzed, Ke Yiwei Customer analysis request provides certain basis, mitigates burden for users.
Method provided by the invention, by opening request tracing service for special services, implements to follow the trail of the special services All requests, and the relevant information of these requests is preserved, complete request tracing service can be provided, and relevant information is preserved, So that user analyzes the operating parameter of these requests as needed, so as to find that system bottleneck, optimization system performance provide base Plinth.
The present invention also provides a kind of request tracing device, based on application server, including:
Opening unit 1 is serviced, for opening request tracing service for special services;
Real-time tracing unit 2, for running request tracing service, request tracing service real-time tracing special services are asked Ask;
Information holding unit 3, for preserving the relevant information of request.
In a kind of embodiment of the present invention, above device further comprises:
Threshold setting unit 4, for setting time threshold for device;Information holding unit 3 may determine that what is received asks Whether the request processing time asked exceeds time threshold, if exceeding, request failure, if without departing from asking successfully, and will sentence Disconnected result is preserved as a part for relevant information.
It is understood that server can judge whether is request processing time of request for receiving according to this threshold value Beyond default time threshold, and it will determine that result is preserved as a part for relevant information.User is facilitated to make requests on analysis.
In one preferred embodiment of the invention, further comprise:
Report generation unit 5, reports and is stored for being generated according to relevant information.
It should be noted that the above-mentioned judgement for judging to ask processing time whether to exceed time threshold can also be given birth to by report Completed into unit 5.Which specifically completed to judge the realization for having no effect on the present invention by unit.
It is understood that in the present embodiment, device integrates request relevant information by report generation unit Analysis, and report is generated so that user checks, it can ask to provide certain basis for customer analysis, mitigate burden for users.
Incorporated by reference to Fig. 3, Fig. 3 show a kind of structure diagram of request tracing device provided by the invention.
Using device provided by the invention, it can be that special services open request tracing service, implement to follow the trail of the specific clothes All requests of business, and the relevant information of these requests is preserved, complete request tracing service can be provided, and preserve related letter Breath, so that user analyzes the operating parameter of these requests as needed, so as to find that system bottleneck, optimization system performance provide Basis.
More than several embodiments be only the preferred embodiment of the present invention, several specific embodiments of the above can be with Any combination, the embodiment obtained after combination is also within protection scope of the present invention.It should be pointed out that for the art For those of ordinary skill, without departing from the principle of the present invention, some improvement can also be made, these improvement should also regard For protection scope of the present invention.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be and other The difference of embodiment, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related part is said referring to method part It is bright.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or use the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and the principles and novel features disclosed herein phase one The most wide scope caused.

Claims (9)

  1. A kind of 1. request tracing method, based on application server, it is characterised in that the described method includes:
    Request tracing service is opened for special services;
    The request tracing service is run, the request of special services described in real-time tracing;
    Preserve the relevant information of the request.
  2. 2. based on the method described in claim 1, it is characterised in that described to open the specific of request tracing service for special services Process includes:
    The server category of the special services realizes the application programming interface for being used for making requests on Scout service;
    For the server category registration request Scout service and related Backend parameter is set, after the completion of, the special services are asked Scout service is asked to open.
  3. 3. according to the method described in claim 1, it is characterized in that, the relevant information includes:
    The request time started, end time, EJB methods entry time, post-set time, are called by the SQL statement of JDBC Beginning and ending time, JTA transaction start times, end time.
  4. 4. according to the method described in claim 2, it is characterized in that, after running request tracing service, the method into One step includes:
    Whether the request processing time for the request for judging to receive exceeds default time threshold, described to ask if exceeding Failure is asked, if without departing from, it is described to ask successfully, and will determine that result is preserved as a part for the relevant information.
  5. 5. according to the method described in claim 4, it is characterized in that, after the registration request Scout service is related to the setting Platform parameter is realized by explaining order.
  6. 6. method according to any one of claims 1 to 5, it is characterised in that further comprise:
    Generated according to the relevant information and report and stored.
  7. A kind of 7. request tracing device, based on application server, it is characterised in that including:
    Opening unit is serviced, for opening request tracing service for special services;
    Real-time tracing unit, for running the request tracing service, specific clothes described in the request tracing service real-time tracing The request of business;
    Information holding unit, for preserving the relevant information of the request.
  8. 8. device according to claim 7, it is characterised in that further comprise:
    Threshold setting unit, for setting time threshold for described device;Described information storage unit may determine that what is received Whether the request processing time of the request exceeds the time threshold, if exceeding, the request failure, if without departing from, It is described to ask successfully, and will determine that result is preserved as a part for the relevant information.
  9. 9. the device according to claim 7 or 8, it is characterised in that further comprise:
    Report generation unit, reports and is stored for being generated according to the relevant information.
CN201711085571.XA 2017-11-07 2017-11-07 A kind of request tracing method and device Pending CN107977300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711085571.XA CN107977300A (en) 2017-11-07 2017-11-07 A kind of request tracing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711085571.XA CN107977300A (en) 2017-11-07 2017-11-07 A kind of request tracing method and device

Publications (1)

Publication Number Publication Date
CN107977300A true CN107977300A (en) 2018-05-01

Family

ID=62013062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711085571.XA Pending CN107977300A (en) 2017-11-07 2017-11-07 A kind of request tracing method and device

Country Status (1)

Country Link
CN (1) CN107977300A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026545A (en) * 2019-11-21 2020-04-17 山东中创软件商用中间件股份有限公司 Application server optimization method, system, device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110029822A1 (en) * 2009-08-03 2011-02-03 Sap Ag Tracking of java objects during request processing
CN103678630A (en) * 2013-12-19 2014-03-26 北京用友政务软件有限公司 Database monitoring method and system
CN105204983A (en) * 2014-06-16 2015-12-30 北京基调网络系统有限公司 Java Web application performance diagnostic method and device
CN106534242A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Processing method and device for requests in distributed system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110029822A1 (en) * 2009-08-03 2011-02-03 Sap Ag Tracking of java objects during request processing
CN103678630A (en) * 2013-12-19 2014-03-26 北京用友政务软件有限公司 Database monitoring method and system
CN105204983A (en) * 2014-06-16 2015-12-30 北京基调网络系统有限公司 Java Web application performance diagnostic method and device
CN106534242A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Processing method and device for requests in distributed system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026545A (en) * 2019-11-21 2020-04-17 山东中创软件商用中间件股份有限公司 Application server optimization method, system, device and computer readable storage medium

Similar Documents

Publication Publication Date Title
US7305465B2 (en) Collecting appliance problem information over network and providing remote technical support to deliver appliance fix information to an end user
US7962612B2 (en) Method for connection leak detection and prevention
US6145096A (en) Method, system and computer program product for iterative distributed problem solving
US9690562B2 (en) Detecting computing processes requiring reinitialization after a software package update
US8156479B2 (en) System and method of monitoring dynamic scopes in synchronous and asynchronous calls
US20050278630A1 (en) Tracking user operations
TW201025069A (en) Method and apparatus for information recovery in using snap shot database
US7661113B2 (en) Method and system for data preparation and communication between software applications
US20150088772A1 (en) Enhancing it service management ontology using crowdsourcing
US20110211687A1 (en) System and Method for Call Flow Generation Via Real-Time Tracking of Guided Problem Resolution
CN107360155A (en) A kind of automatic source tracing method of network attack and system based on threat information and sandbox technology
CN109960621A (en) A kind of data pick-up method based on big data visual control platform
JP2004021438A (en) User operation history collecting mechanism, user operation history collecting program and user supporting system for information processor
CN111753169B (en) Data acquisition system based on internet
EP3319353A2 (en) System and method for performing screen capture-based sensitive information protection within a call center
CN108595233A (en) A kind of electronic evidence acquisition method and system based on voice prompt
CN107977300A (en) A kind of request tracing method and device
CN113760397A (en) Interface call processing method, device, equipment and storage medium
US20110029472A1 (en) Method and Apparatus for Run-Time User Control of System-Generated Content
US9436538B2 (en) Computer-readable recording medium, log acquisition device, and log acquisition method
US20100042867A1 (en) Customization and reuse of logged agent activity during remote take over help session
CN109088948A (en) A kind of methods of exhibiting of PUSH message, equipment and storage medium
US20220147437A1 (en) Automated testing of mobile devices using visual analysis
CN113923190A (en) Method and device for identifying equipment identification jump, server and storage medium
US9069639B2 (en) Managing a user proxy configuration in a daemon that frequently loads and unloads

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180501