The plugin initiates a global tracing subscriber, named AgentTracingLayer. Its function is to gather diagnostic spans from the application, which are then stored in a temporary buffer. This storage process utilizes the cross-beam channel.
Next, the plugin creates a background thread. This thread includes an HTTP server, provided by Actix, that serves the collected spans.
The v1 encoding for spans and name registries is done in a simple and compact manner. In essence, it is a set of base64 buffers.
Lastly, the VScode extension performs a consolidation of all spans. It uses the scope/name key for this purpose, and it displays average durations calculated over an entire observed time period.