-
Notifications
You must be signed in to change notification settings - Fork 15
[ruby] Enable FFE flag evaluation metrics tests [ruby@sameerank/FFL-1945/add-flag-eval-metrics] #6781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sameerank
wants to merge
2
commits into
main
Choose a base branch
from
sameerank/FFL-1945/enable-ruby-flag-eval-metrics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+20
−2
Open
[ruby] Enable FFE flag evaluation metrics tests [ruby@sameerank/FFL-1945/add-flag-eval-metrics] #6781
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,18 @@ def flush | |
| worker.send(:send_events, *worker.dequeue) | ||
| end | ||
|
|
||
| # Flush OTel metrics | ||
| begin | ||
| if defined?(::OpenTelemetry) && defined?(::OpenTelemetry::SDK::Metrics::MeterProvider) | ||
| meter_provider = ::OpenTelemetry.meter_provider | ||
| if meter_provider.is_a?(::OpenTelemetry::SDK::Metrics::MeterProvider) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the goal of this check? |
||
| meter_provider.force_flush | ||
| end | ||
| end | ||
| rescue => e | ||
| Rails.logger.warn("Failed to flush OTel metrics: #{e.class}: #{e}") | ||
|
Comment on lines
+51
to
+52
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would suggest to surface exception as it will be better to see, this is testing app and suppose to highlight issues. |
||
| end | ||
|
|
||
| render plain: 'OK' | ||
| end | ||
| end | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openfeature-sdkis declared as~> 0.5, but this range also allows0.6.x(and newer<1.0) releases. Since this change explicitly depends on provider hooks support from0.5.1+, allowing0.6.xcan pull in a different API line during image builds and break the Datadog OpenFeature integration used by the FFE metrics tests. Pin this to the intended compatibility window (for example~> 0.5.1or>= 0.5.1, < 0.6).Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches the upper bound that was previously in place (up to
< 1.0), and the provided justification for limiting the minor version to< 0.6contradicts our passing tests which use the latest availableopenfeature-sdk0.6.5 versionhttps://github.com/DataDog/system-tests/actions/runs/24794277678/job/72560160287
Look for
Using openfeature-sdk 0.6.5in the "Build weblog" step during thebundle installoutput.