Skip to content

Conversation

@erdirowlands
Copy link
Contributor

@erdirowlands erdirowlands commented Nov 25, 2024

What

Updates the keying mechanism for evaluation metrics to use a concatenated string format: "#{feature_name}\0#{variation_identifier}". This string combines the feature_name and variation_identifier separated by a null character (\0). This change replaces the previous approach of keying on the MetricsEvent class, which has now been deleted.

Why

We see an edge case occurring during the iteration of evaluation metrics when aggregating and sending data. Specifically, the keys seem to reference other objects in memory, and seg faults. Although Ruby permits using class objects as keys, the evaluation cache uses a hash with string keys and does not suffer from the same problem, so the intent is standardise on string keys to see if we can fix this edge case.

Testing

  • Updated unit tests to reflect the new key structure
  • Manual tests with Prod2 app
  • Testgrid

@erdirowlands erdirowlands changed the title Ffm 12192 patch 5 FFM-12192 patch 5 Nov 25, 2024
Copy link

@davejohnston davejohnston left a comment

Choose a reason for hiding this comment

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

This change looks good

@erdirowlands erdirowlands merged commit 766909d into main Nov 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants