Skip to content

Conversation

@skipkayhil
Copy link

Previously, the key being logged in cache instrumentation would always be normalized by the instrumenter. However, many cache methods did not pass all of the options necessary to normalize a key into the instrumenter and so the key would not always reflect the actual key used in the cache.

In rails/rails@9af99bf, the instrumenter was updated to no longer normalize the key because of this inconsistency. Now the caller of the instrument method is expected to pass the normalized key instead of the pre-normalized key.

To maintain compatibility with Rails both before and after this commit, The key passed into instrument is conditional based on the Rails version, and the conditional can eventually be removed once Rails 7.2 is the minimum supported version

Previously, the key being logged in cache instrumentation would always
be normalized by the instrumenter. However, many cache methods did not
pass all of the options necessary to normalize a key into the
instrumenter and so the key would not always reflect the actual key used
in the cache.

In rails/rails@9af99bf, the
instrumenter was updated to no longer normalize the key because of this
inconsistency. Now the caller of the instrument method is expected to
pass the normalized key instead of the pre-normalized key.

To maintain compatibility with Rails both before and after this commit,
The key passed into instrument is conditional based on the Rails
version, and the conditional can eventually be removed once Rails 7.2 is
the minimum supported version

Co-authored-by: Nick Schwaderer <nick.schwaderer@shopify.com>
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