Conversation
There was a problem hiding this comment.
Pull request overview
Adds the remaining FlatBuffers table definitions for “regular operations” on impact metrics (counter/gauge/histogram), along with regenerated language bindings used by the Rust FFI layer and the .NET engine.
Changes:
- Extend
enabled-message.fbswithIncCounter,DefineGauge,SetGauge,DefineHistogram, andObserveHistogramtables. - Update Rust FlatBuffers generated bindings to include the new tables.
- Add .NET FlatBuffers generated message types for the new tables.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
flat-buffer-defs/enabled-message.fbs |
Adds new metric operation table definitions to the schema. |
yggdrasilffi/src/flat/enabled-message_generated.rs |
Rust generated bindings updated to include the new operation types (currently introduces invalid Rust syntax in new builder method signatures). |
dotnet-engine/Yggdrasil.Engine/yggdrasil/messaging/IncCounter.cs |
New generated .NET binding for IncCounter. |
dotnet-engine/Yggdrasil.Engine/yggdrasil/messaging/DefineGauge.cs |
New generated .NET binding for DefineGauge. |
dotnet-engine/Yggdrasil.Engine/yggdrasil/messaging/SetGauge.cs |
New generated .NET binding for SetGauge. |
dotnet-engine/Yggdrasil.Engine/yggdrasil/messaging/DefineHistogram.cs |
New generated .NET binding for DefineHistogram. |
dotnet-engine/Yggdrasil.Engine/yggdrasil/messaging/ObserveHistogram.cs |
New generated .NET binding for ObserveHistogram. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self.fbb_.push_slot::<i64>(IncCounter::VT_VALUE, value, 0); | ||
| } | ||
| #[inline] | ||
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SampleLabelEntry<'b >>>>) { |
There was a problem hiding this comment.
add_labels has a malformed generic type (missing closing >/)), which makes the generated Rust code fail to compile. This should be regenerated/fixed so the parameter type matches SetGaugeArgs.labels/IncCounterArgs.labels (i.e., a WIPOffset<Vector<..., ForwardsUOffset<SampleLabelEntry<...>>>>).
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SampleLabelEntry<'b >>>>) { | |
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<SampleLabelEntry<'b>>>>> ) { |
| self.fbb_.push_slot::<f64>(SetGauge::VT_VALUE, value, 0.0); | ||
| } | ||
| #[inline] | ||
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SampleLabelEntry<'b >>>>) { |
There was a problem hiding this comment.
add_labels has a malformed generic type (unbalanced angle brackets), which will break compilation. Please regenerate/fix the signature so it is a WIPOffset<Vector<'b, ForwardsUOffset<SampleLabelEntry<'b>>>> (matching SetGaugeArgs.labels).
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SampleLabelEntry<'b >>>>) { | |
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<SampleLabelEntry<'b>>>>) { |
| self.fbb_.push_slot::<f64>(ObserveHistogram::VT_VALUE, value, 0.0); | ||
| } | ||
| #[inline] | ||
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SampleLabelEntry<'b >>>>) { |
There was a problem hiding this comment.
add_labels has an invalid type signature (missing closing >), so this generated file won’t compile. Regenerate/fix the signature so it matches ObserveHistogramArgs.labels (a WIPOffset<Vector<'b, ForwardsUOffset<SampleLabelEntry<'b>>>>).
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SampleLabelEntry<'b >>>>) { | |
| pub fn add_labels(&mut self, labels: flatbuffers::WIPOffset<flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<SampleLabelEntry<'b>>>>) { |
This adds the remaining counter/gauge/histgram operation flatbuffer types part of PR #76