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

Fix unnecessary meta_data being logged during breadcrumb validation #530

Merged
merged 4 commits into from
Jan 22, 2019

Conversation

Cawllec
Copy link
Contributor

@Cawllec Cawllec commented Jan 22, 2019

Goal

Alters breadcrumb validation logs:

  • Reduces the log-level to debug
  • No longer logs the value of meta_data when rejected, only the key

In addition:

  • Removes key parameter from cache breadcrumbs due to potentially being an un-breadcrumbable type

Fixes #528

@Cawllec Cawllec requested a review from a team January 22, 2019 12:02
@@ -26,21 +26,21 @@ def validate(breadcrumb)
if valid_meta_data_type?(v)
true
else
@configuration.warn("Breadcrumb #{breadcrumb.name} meta_data #{k}:#{v} has been dropped for having an invalid data type")
@configuration.debug("Breadcrumb #{breadcrumb.name} meta_data #{k} has been dropped for having an invalid data type")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you include v.class in the log message? (as that shouldn't be sensitive)

Copy link
Contributor

@tobyhs tobyhs left a comment

Choose a reason for hiding this comment

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

lgtm, although it might be good to see if there is a proper way to get the cache key (but so far, it looks like the method(s) used to compute the keys are private methods in activesupport)

@Cawllec Cawllec merged commit bf0383a into master Jan 22, 2019
@Cawllec Cawllec deleted the breadcrumbs/log-fix branch January 22, 2019 19:55
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