System and method for generating service topology graph for microservices using distributed tracing
Abstract
A system and method for generating a service topology graph for microservices in a computing environment uses traces collected from the microservices to generate the service topology graph. The traces are processed to create nodes and edges of the service topology graph. A new node is created when a current trace being processed is a trace being processed for a first time and an edge is created between a node that is associated with a parent span of a current span being processed when the current span is a first span being processed for the current trace and the current span includes a parent span identification.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A computer-implemented method for generating a service topology graph for microservices in a computing environment, the method comprising:
collecting traces from the microservices, wherein each of the traces includes at least one span; and processing the traces to create nodes and edges of the service topology graph, wherein the nodes represent the microservices and the edges are connections between the nodes, wherein the processing of the traces includes, for each of the traces:
creating a new node in the service topology graph when a current trace being processed is a trace being processed for a first time; and
processing the at least one span of the current trace, including creating an edge between a node that is associated with a parent span of a current span being processed and the new node when the current span is a first span being processed for the current trace and the current span includes a parent span identification.
2 . The method of claim 1 , further comprising iterating through the nodes of the service topology graph to detect any deprecated node in the service topology graph, wherein a deprecated node is a node without any edge connecting the node to another node in the service topology graph.
3 . The method of claim 1 , further comprising iterating through the edges of the service topology graph to detect any network bottleneck in the service topology graph, wherein a network bottleneck is an edge with a latency greater than a threshold.
4 . The method of claim 3 , wherein the latency of the edge is defined as time taken to complete a request from a source node and a destination node, where the source and destination nodes are connected to each other by the edge.
5 . The method of claim 1 , wherein processing the at least one span of the current trace further includes, when a failure is found in the current span, updating a failure status of a node associated with the current span.
6 . The method of claim 1 , wherein creating the edge includes connecting the node to the new node using the edge pointing from the node to the new node.
7 . The method of claim 1 , further comprising graphically adding network latency measures to the edges of the service topology graph.
8 . The method of claim 7 , wherein the latency measures include numbers in a predefined range, where larger numbers represent higher latencies.
9 . A non-transitory computer-readable storage medium containing program instructions for method for generating a service topology graph for microservices in a computing environment, wherein execution of the program instructions by one or more processors of a computer causes the one or more processors to perform steps comprising:
collecting traces from the microservices, wherein each of the traces includes at least one span; and processing the traces to create nodes and edges of the service topology graph, wherein the nodes represent the microservices and the edges are connections between the nodes, wherein the processing of the traces includes, for each of the traces:
creating a new node in the service topology graph when a current trace being processed is a trace being processed for a first time; and
processing the at least one span of the current trace, including creating an edge between a node that is associated with a parent span of a current span being processed and the new node when the current span is a first span being processed for the current trace and the current span includes a parent span identification.
10 . The computer-readable storage medium of claim 9 , wherein the steps further comprise iterating through the nodes of the service topology graph to detect any deprecated node in the service topology graph, wherein a deprecated node is a node without any edge connecting the node to another node in the service topology graph.
11 . The computer-readable storage medium of claim 9 , wherein the steps further comprise iterating through the edges of the service topology graph to detect any network bottleneck in the service topology graph, wherein a network bottleneck is an edge with a latency greater than a threshold.
12 . The computer-readable storage medium of claim 11 , wherein the latency of the edge is defined as time taken to complete a request from a source node and a destination node, where the source and destination nodes are connected to each other by the edge.
13 . The computer-readable storage medium of claim 9 , wherein processing the at least one span of the current trace further includes, when a failure is found in the current span, updating a failure status of a node associated with the current span.
14 . The computer-readable storage medium of claim 9 , wherein creating the edge includes connecting the node to the new node using the edge pointing from the node to the new node.
15 . The computer-readable storage medium of claim 9 , wherein the steps further comprise graphically adding network latency measures to the edges of the service topology graph.
16 . The computer-readable storage medium of claim 15 , wherein the latency measures include numbers in a predefined range, where larger numbers represent higher latencies.
17 . A system comprising:
memory; and at least one processor configured to:
collect traces from microservices in a computing environment, wherein each of the traces includes at least one span; and
process the traces to create nodes and edges of a service topology graph for the microservices, wherein the nodes represent the microservices and the edges are connections between the nodes, wherein the at least one process is configured to, for each of the traces:
create a new node in the service topology graph when a current trace being processed is a trace being processed for a first time; and process the at least one span of the current trace, including creating an edge between a node that is associated with a parent span of a current span being processed and the new node when the current span is a first span being processed for the current trace and the current span includes a parent span identification.
18 . The system of claim 17 , wherein the at least one processor is configured to iterate through the nodes of the service topology graph to detect any deprecated node in the service topology graph, wherein a deprecated node is a node without any edge connecting the node to another node in the service topology graph.
19 . The system of claim 17 , wherein the at least one processor is configured to iterate through the edges of the service topology graph to detect any network bottleneck in the service topology graph, wherein a network bottleneck is an edge with a latency greater than a threshold.
20 . The system of claim 19 , wherein the latency of the edge is defined as time taken to complete a request from a source node and a destination node, where the source and destination nodes are connected to each other by the edge.Join the waitlist — get patent alerts
Track US2024020214A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.