Skip to content
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

Instrument Flipper with ActiveSupport #7427

Merged

Conversation

jibees
Copy link
Contributor

@jibees jibees commented Apr 15, 2021

What? Why?

Add Flipper instrumentation

What should we test?

  • Test a feature: for exemple unit_price
  • When you create a feature (foo), you should see:
 Flipper feature(foo) adapter(active_record) add  (14.8ms)  [ result=true ]
 Flipper feature(foo) add true (15.2ms)  [ thing=nil ]
  • When you delete a feature (foo), you should see a log like
Flipper feature(foo) adapter(active_record) remove  (29.5ms)  [ result=true ]

Release notes

Instrument Flipper

Changelog Category: Technical changes

@jibees jibees requested a review from sauloperez April 15, 2021 07:42
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #7427 (579104d) into master (0c182c4) will not change coverage.
The diff coverage is n/a.

❗ Current head 579104d differs from pull request most recent head 1e0230a. Consider uploading reports for the commit 1e0230a to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7427   +/-   ##
=======================================
  Coverage   93.07%   93.07%           
=======================================
  Files         633      633           
  Lines       18144    18144           
=======================================
  Hits        16888    16888           
  Misses       1256     1256           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c182c4...1e0230a. Read the comment docs.

Copy link
Contributor

@sauloperez sauloperez left a comment

Choose a reason for hiding this comment

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

💯

@jibees jibees force-pushed the add-flipper-instrumentation branch from 582a629 to eb4c0a0 Compare April 15, 2021 09:20
Gemfile Outdated Show resolved Hide resolved
@jibees jibees force-pushed the add-flipper-instrumentation branch from eb4c0a0 to 1e0230a Compare April 15, 2021 12:05
@Matt-Yorkley Matt-Yorkley added the dev-test A dev need to test this one label Apr 15, 2021
@sauloperez
Copy link
Contributor

sauloperez commented Apr 22, 2021

This is working!

web_1     |   Flipper adapter(active_record) get_all  (1.9ms)  [ result={"unit_price"=>{:boolean=>nil, :actors=>#<Set: {}>, :percentage_of_actors=>nil, :percentage_of_time=>nil, :groups=>#<Set: {"admins"}>}} ]                                               web_1     | Started GET "/assets/icn-close.png" for 172.18.0.1 at 2021-04-22 15:09:24 +0100
web_1     |    (0.4ms)            SELECT ff.key AS feature_key, fg.key, fg.value           FROM flipper_features ff           LEFT JOIN flipper_gates fg ON ff.key = fg.feature_key                                                                             web_1     |   Flipper adapter(active_record) get_all  (1.4ms)  [ result={"unit_price"=>{:boolean=>nil, :actors=>#<Set: {}>, :percentage_of_actors=>nil, :percentage_of_time=>nil, :groups=>#<Set: {"admins"}>}} ]
web_1     | Started POST "/cart/populate" for 172.18.0.1 at 2021-04-22 15:09:24 +0100                                                                                                                                                                           
web_1     |    (1.8ms)            SELECT ff.key AS feature_key, fg.key, fg.value           FROM flipper_features ff           LEFT JOIN flipper_gates fg ON ff.key = fg.feature_key 
web_1     |   Flipper adapter(active_record) get_all  (4.7ms)  [ result={"unit_price"=>{:boolean=>nil, :actors=>#<Set: {}>, :percentage_of_actors=>nil, :percentage_of_time=>nil, :groups=>#<Set: {"admins"}>}} ]
web_1     |   Flipper feature(foo) adapter(active_record) add  (8.7ms)  [ result=true ]
web_1     |   Flipper feature(foo) add true (8.9ms)  [ thing=nil ]

@sauloperez sauloperez merged commit e5610d5 into openfoodfoundation:master Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-test A dev need to test this one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants