-
Notifications
You must be signed in to change notification settings - Fork 598
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
Add Active Support instrumentation #1742
Merged
Merged
Conversation
This file contains 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
kaylareopelle
force-pushed
the
active-support-instrumentation
branch
2 times, most recently
from
January 18, 2023 21:55
9a71fa6
to
fa5aff4
Compare
Active Support has notifications built in to instrument caching-related activities, including: * cache_read * cache_generate * cache_fetch_hit * cache_write * cache_delete * cache_exist? The payload always includes the key and the name of the store class. cache_read also includes whether the read is a hit, and :super_operation when a read is used with https://guides.rubyonrails.org/active_support_instrumentation.html#active-support When these operations are executed, a new segment will be started that includes the payload within the params attribute.
kaylareopelle
force-pushed
the
active-support-instrumentation
branch
from
January 18, 2023 23:07
fa5aff4
to
4e3175e
Compare
fallwith
suggested changes
Jan 18, 2023
* Remove `dynamic_name` from Rails-related configs that do not need it * Capitalize and add a space between references to Rails libraries
fallwith
previously approved these changes
Jan 18, 2023
Add a unit test for the Active Storage instrumentation that does not directly invoke the subscriber class's `#start` and `#finish` methods manually, but instead performs a real Active Storage cache write and confirms that the instrumentation works as expected.
tannalynn
reviewed
Jan 19, 2023
|
||
def test_failsafe_if_event_does_not_match_expected_pattern | ||
in_transaction('test') do | ||
generate_event('charcuterie_build_a_board_workshop') |
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.
lmao
prevent the Rails 3 and 4 environments from running the Active Support caching test for notification verificatation
…er_test Active Support instrumentation: add test
fallwith
approved these changes
Jan 20, 2023
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.
looks great
SimpleCov Report
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Active Support has notifications built in to instrument caching-related activities, including:
cache_read
cache_generate
cache_fetch_hit
cache_write
cache_delete
cache_exist?
The payload always includes the
:key
and the name of the:store
class.cache_read
also includes whether the read is a:hit
, and:super_operation
when a read is used with#fetch
.https://guides.rubyonrails.org/active_support_instrumentation.html#active-support
When these operations are executed, a new segment will be started that includes the payload within the params attribute.
Closes #1514