feat: add remote trace export, zbus integration, and Grafana metrics#4
Merged
Conversation
- REQ-ARCH-038: Remote trace export with CRC-8 binary framing and pluggable transport abstraction (arbiter_trace_export.h/.c) - REQ-ARCH-042: Zbus integration with facts input subscriber and result output publisher (arbiter_zbus.h/.c) - REQ-ARCH-042: Grafana metrics via Zephyr STATS subsystem with eval_count, latency, faults_active, etc. (arbiter_metrics.c) - Kconfig: CONFIG_ARBITER_TRACE_EXPORT, CONFIG_ARBITER_ZBUS, CONFIG_ARBITER_METRICS with proper dependency guards - CMakeLists.txt updates for conditional compilation Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remote trace export, Zbus integration, and Grafana metrics
Changes
REQ-ARCH-038: Remote trace export
include/arbiter/arbiter_trace_export.h— Transport abstraction and export APIlib/arbiter_trace_export.c— Binary frame serialization with CRC-8 (poly 0x07), LE16 encoding, sequence counter wrapping at UINT16_MAX[0xAB][len_le16][seq_u16][rule_id_u16][fired_u8][action_id_u16][n_facts_u8][fact_ids...][crc8]CONFIG_ARBITER_TRACE_EXPORTREQ-ARCH-042: Zbus integration
include/arbiter/arbiter_zbus.h— Message structs (arbiter_facts_msg,arbiter_result_msg) and channel declarationssubsys/arbiter/arbiter_zbus.c— ZBUS_CHAN_DEFINE for facts input/result output, listener-based subscriber callingARBITER_set_i32+ARBITER_set_timestamp, publisher for result after evalCONFIG_ARBITER_ZBUS(depends onZBUS)REQ-ARCH-042: Grafana metrics
subsys/arbiter/arbiter_metrics.c— Zephyr STATS section with eval_count, eval_latency_us, eval_max_latency_us, rules_fired, faults_active, op_count_last; SYS_INIT auto-registrationCONFIG_ARBITER_METRICS(depends onSTATS)Build integration
CMakeLists.txt: conditional trace export sourcesubsys/arbiter/CMakeLists.txt: conditional zbus and metrics sourcessubsys/arbiter/Kconfig: all three new config options with dependency guardsTesting
Conversation: https://app.warp.dev/conversation/8f8df0d3-c90a-42a5-90a5-50b4e5647125
Run: https://oz.warp.dev/runs/019e88c4-f762-7750-8ff8-23657058f6f5
This PR was generated with Oz.