Skip to content

feat: flatbuffers definitions for rest of impact metrics regular operations#77

Merged
daveleek merged 1 commit intomainfrom
feat/rest-of-impact-metrics-flatbuffers
Feb 10, 2026
Merged

feat: flatbuffers definitions for rest of impact metrics regular operations#77
daveleek merged 1 commit intomainfrom
feat/rest-of-impact-metrics-flatbuffers

Conversation

@daveleek
Copy link
Contributor

@daveleek daveleek commented Feb 10, 2026

This adds the remaining counter/gauge/histgram operation flatbuffer types part of PR #76

Copilot AI review requested due to automatic review settings February 10, 2026 10:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.fbs with IncCounter, DefineGauge, SetGauge, DefineHistogram, and ObserveHistogram tables.
  • 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 >>>>) {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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<...>>>>).

Suggested change
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>>>>> ) {

Copilot uses AI. Check for mistakes.
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 >>>>) {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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>>>>) {

Copilot uses AI. Check for mistakes.
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 >>>>) {
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>>>>).

Suggested change
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>>>>) {

Copilot uses AI. Check for mistakes.
Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ye!

@github-project-automation github-project-automation bot moved this from New to Approved PRs in Issues and PRs Feb 10, 2026
@daveleek daveleek merged commit dad4255 into main Feb 10, 2026
14 checks passed
@github-project-automation github-project-automation bot moved this from Approved PRs to Done in Issues and PRs Feb 10, 2026
@daveleek daveleek deleted the feat/rest-of-impact-metrics-flatbuffers branch February 10, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants