y-scope / clp

Compressed Log Processor (CLP) is a free log management tool capable of compressing logs and searching the compressed logs without decompression.
https://yscope.com
Apache License 2.0
874 stars 70 forks source link

ffi: Support retrieving node ID from a `clp::ffi::SchemaTree::NodeLocator`. #572

Open junhaoliao opened 2 weeks ago

junhaoliao commented 2 weeks ago

Request

If we can retrieve node ID from a clp::ffi::SchemaTree::NodeLocator, in subscriptions to schema tree node insertions (i.e. IrUnitHandler::handle_schema_tree_node_insertion) we will be able to compare the node's key name and store ID of the tree nodes in interest to improve log viewing experience. "tree nodes in interest" - examples include log level & timestamp kv-pairs.

Possible implementation

Add a public method into the class like get_node_id().

junhaoliao commented 2 weeks ago

For now, clp-ffi-js can mitigate by maintaining a counter in the IrUnitHandler class.