nodesource / nsolid

N|Solid Runtime
Other
61 stars 4 forks source link

agents: implement SpanCollector helper class #160

Closed santigimeno closed 3 months ago

santigimeno commented 4 months ago

SpanCollector is a class that allows to start collecting spans and report them to a callback function running in a specific uv_loop_t thread. The collector can be configured with a minimum span count and a time interval to report the spans. In addition, the collector can be configured with a transform function that will be applied to the spans before calling the final callback. Use this class to dry the code in the ZmqAgent and OTLPAgent.