Span Cache Matching for Distributed Tracing Dependency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional server clusters are unable to determine the relationship between client and server spans in distributed tracing, preventing the generation of useful dependency information for debugging and performance improvement in microservice architectures.
Innovation Solution
A system that includes a span collector and dependency processors to identify and cache spans based on their kind, matching client and server spans using span identifiers to generate dependency information, which includes source and target service identifiers, endpoint information, latency, and geographic location.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If conventional server clusters collect tracing spans without processing, then data collection is simple and fast, but dependency information cannot be generated and tracing relationships remain undetermined
Solution Approach 1:
The system performs preliminary actions by collecting and caching client spans with their identifiers before server spans arrive. This allows the dependency processor to quickly match server spans with their corresponding client spans without complex real-time processing, thereby generating dependency information while maintaining system efficiency
Solution Approach 2:
The patent introduces a span cache as an intermediary component that stores client spans temporarily. This cache acts as a mediator between span collection and dependency processing, allowing the system to decouple data collection from analysis and enabling efficient matching operations without increasing overall system complexity
2Loss of time
If span matching and dependency processing are performed in real-time, then dependency information is generated immediately, but processing time and computational resources increase
Solution Approach 1:
Client spans are cached in advance with their identifiers prepared for matching. When server spans arrive, the matching operation is simply a lookup in the cache rather than a complex real-time analysis, significantly reducing processing time while maintaining high throughput
Solution Approach 2:
The tracing system is segmented into distinct components: span collection, span caching, and dependency processing. This segmentation allows each component to operate independently and efficiently, with the cache handling storage and the processor handling analysis, thereby optimizing both time and productivity
3Loss of information
If all spans are processed and stored in detail, then complete dependency information is available, but memory usage and storage requirements increase
Solution Approach 1:
The system extracts only the essential matching information (span identifiers) from client spans and stores them in the cache. Full dependency information is generated only when matches are found, allowing the system to maintain tracing completeness while minimizing memory usage by storing only necessary matching keys rather than complete span data
Data Source
AI summary
Methods, systems, and computer program products are included for performing tracing in a distributed environment. An example method includes determining that a first span corresponds to a client span kind and that a second span corresponds to a server span kind. The first span is cached in association with a span identifier. An identifier associated with the second span is matched to the span identifier associated with the first span. Based on the matching, dependency information is generated corresponding to the first span and the second span.


