Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method, system and device for tracking call chain in micro-service environment and storage medium

A technology of micro-service and call chain, which is applied in the direction of transmission system, program control device, program control design, etc., and can solve complex problems

Pending Publication Date: 2020-11-24
八维通科技有限公司
View PDF8 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

There are two mainstream implementation schemes for microservices: the Spring Cloud framework using the HTTP protocol and the Dubbo framework based on the TCP protocol. Based on the HTTP protocol, it is necessary to propagate the TraceId through the Request Header. Improve

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, system and device for tracking call chain in micro-service environment and storage medium
  • Method, system and device for tracking call chain in micro-service environment and storage medium
  • Method, system and device for tracking call chain in micro-service environment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] A method of calling chain tracking in a microservice environment, such as figure 1 shown, including the following steps:

[0043] S100. Obtain the written byte stream in response to the startup of the JAVA application program;

[0044] S200. Identify the byte stream through HTTP Output Stream Wrapper;

[0045] S300. If the byte stream is identified as an HTTP byte stream, add a Trace Id request header to the HTTP byte stream;

[0046] S400. Transmit the HTTP byte stream added with the Trace Id request header to the callee.

[0047] The whole process can be understood as adding an interceptor when the Java application starts, that is, using the premain method of the JAVA Agent technology, dynamically modifying the Class bytecode when loading the class, and checking whether the class to be loaded is the specified class; if so, modify The behavior of the target class, or do nothing if it is not.

[0048] It should be understood that although figure 1 The various steps...

Embodiment 2

[0075] A system for tracking call chains in a microservice environment, including a byte stream acquisition module 100, an identification module 200, an addition module 300, and a transmission module 400;

[0076] The byte stream acquisition module 100, in response to the startup of the JAVA application, acquires the written byte stream;

[0077] The identifying module 200 is configured to identify the byte stream through the HTTP Output Stream Wrapper;

[0078] The adding module 300 is configured to: add the Trace Id request header to the HTTP byte stream if the byte stream is identified as an HTTP byte stream;

[0079] The transmission module 400 is configured to transmit the HTTP byte stream added with the Trace Id request header to the callee.

[0080] In other embodiments, the identification module 200 is configured to: initiate an HTTP byte stream identification request, and identify the HTTP byte stream based on the obtained byte stream.

[0081] In other embodiments,...

Embodiment 3

[0094] A computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:

[0095] In response to the start of the JAVA application program, obtain the written byte stream;

[0096] Identifying the byte stream through the HTTP Output Stream Wrapper;

[0097] If the byte stream is identified as an HTTP byte stream, the Trace Id request header is added to the HTTP byte stream;

[0098] Transfer the HTTP byte stream with the Trace Id header added to the callee.

[0099] In one embodiment, when the processor executes the computer program, the implementation of identifying the byte stream through the HTTP Output StreamWrapper is specifically: initiating an HTTP byte stream identification request, and identifying the HTTP output stream based on the obtained byte stream. byte stream.

[0100] In one embodiment, when the processor executes the compu...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for tracking a call chain in a micro-service environment, which comprises the following steps of: obtaining a written byte stream in response to the start of a JAVA application program; identifying the byte stream through an HTTP Output Stream Wrapper; if the byte stream is identified as an HTTP byte stream, adding a Trace Id request header into the HTTP byte stream; and transmitting the HTTP byte stream added with the Trace Id request header to a callee. According to the method, the HTTP byte stream is identified by intercepting the java bottom TCP output datastream, and the Trace Id request header is added to the HTTP byte stream, so that the Trace Id is transmitted to a callee, and the propagation of the Trace Id is realized; and the persistence characteristic of TCP / IP is fully utilized, the identification result is stored, and the data transmission efficiency of a non-HTTP scene is not influenced.

Description

technical field [0001] The present invention relates to the technical field of real-time monitoring of business data, in particular to a method, system, device and storage medium for tracking call chains in a micro-service environment. Background technique [0002] In the existing technical solutions, a mature, flexible and agile micro-service technology architecture system is generally adopted. There are hundreds of micro-services running in the production environment (one micro-service multi-machine deployment), but these micro-services do not exist in isolation , There is a call dependency between them. When a fault occurs, due to the complex call chain, when locating the problem, the operation and maintenance personnel only locate the problem based on the text log information, which makes it difficult to quickly locate the problem. [0003] In the process of operation and maintenance, the generally mature and common solution is to restore the call chain from the log, and...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/448G06F11/30H04L29/06H04L29/08
CPCG06F11/3089G06F9/4498H04L67/02H04L67/34H04L69/22
Inventor 吴永合余华琼杨宏旭陈刚刘晓宏
Owner 八维通科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products