xapi-project / xen-api

The Xapi Project's XenAPI Server
http://xenproject.org/developers/teams/xapi.html
Other
342 stars 282 forks source link

IH-642: Restructure xs-trace to use Cmdliner #5778

Open contificate opened 4 days ago

contificate commented 4 days ago

The xs-trace utility is restructured to enhance its readability and, to aid with potential future extension, its CLI is reimplemented in terms of Cmdliner.

It is hoped that the current command modes are consistent with what was already expected by xs-trace, i.e. xs-trace (cp|mv)

These changes should make it simpler to extend this utility with more functionality. For example, there is an idea to add some short conversion routines from Zipkinv2 to Google's Catapult trace format - so that single host triaging can bypass heavy distributed tracing services and use functionality built into Chrome (or the online Perfetto trace viewer).

image image

contificate commented 4 days ago

Marking this as ready for review. These changes are pretty isolated but I suspect there will be some suggestions for better descriptions of the arguments, commands, man page, etc.

I've tested this on a host manually and it seems to work.

contificate commented 3 days ago

Pushed a fixup commit to address review comments. If this gets approved, it should be squashed.

contificate commented 4 hours ago

Thanks for the reviews.

I've added the "don't merge yet" label as I think it would be good to run a test case, if possible (although I'm unsure if the sequence file describes tests that can easily be made to run). That said, testing was done from a host and all was working fine.

I'll address the other review comments soon.