feat(instrumentation): generate collector routing - #619
rapids-bot[bot] merged 4 commits into
Conversation
6eaca4e to
f5e948a
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: QUIET Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe change adds shared collector event serialization and feature-gated collector sink support. Build options enable generated routing, which deserializes events by entity name and forwards them to matching observers. ChangesCollector sink integration
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The collector integration adds typed, feature-gated event routing with roundtrip coverage, and no actionable merge-blocking risk is currently evidenced. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 8 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| } | ||
|
|
||
| /// Encode an [`Event`] using the collector wire format. | ||
| pub fn serialize_event<T>(event: &Event<T>) -> Result<Vec<u8>, bitcode::Error> |
There was a problem hiding this comment.
Nit: this could be an Event<T> method.
There was a problem hiding this comment.
Skipping this since serialization is a concern of and varies between exporters
|
|
||
| /// Forwards a collected event through its entity observer. | ||
| #[doc(hidden)] | ||
| pub fn forward<E>(observer: &Observer<E>, event: crate::Event<E::Event>) |
There was a problem hiding this comment.
Nit: could be method of Observer<E>
| /// Provides handles for an entity type through its shared event observer. | ||
| pub struct Observer<E: InstrumentedEntity> { | ||
| inner: Arc<ObserverInner<E::Event>>, | ||
| pub(crate) inner: Arc<ObserverInner<E::Event>>, |
|
/merge |
Description
Based off feat(store): add schema-based filesystem event loading #520 which needs to get merged first.Add schema-generated routing from collector entity stream names to typed instrumentation observers.
CollectorRouterand implementCollectorSinkfor generated model contexts.quent-events/serdedirectly in the collector client.Testing
pixi run cargo fmt --all -- --checkpixi run cargo test -p quent-instrumentation-buildpixi run cargo check -p quent-instrumentation --features io-collectorpixi run cargo test -p quent-instrumentation --features io-collector --test collector_roundtrippixi run cargo test -p quent-collector-clientpixi run cargo test -p quent-collector -p quent-io-collectorWritten by Codex.