Skip to content

Avoid empty hash default values in analytics methods#11800

Merged
aduth merged 1 commit intomainfrom
aduth-nil-default-analytics-events
Jan 27, 2025
Merged

Avoid empty hash default values in analytics methods#11800
aduth merged 1 commit intomainfrom
aduth-nil-default-analytics-events

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Jan 24, 2025

🛠 Summary of changes

Updates AnalyticsEvents method signatures to avoid assigning a default empty hash value {}, preferring nil instead to ensure values are omitted from logs.

As with #11799, this serves to reduce the size (and cost) of our logging payloads by removing values which aren't relevant for querying. It is not possible to query for an empty hash value in CloudWatch Insights.

This is also an iterative step in the migration away from errors to error_details which will involve making error_details a guaranteed return value from FormResponse#to_h.

📜 Testing Plan

Verify build passes.

changelog: Internal, Analytics, Avoid logging empty hash default values
@aduth aduth force-pushed the aduth-nil-default-analytics-events branch from 6f12e33 to df9f391 Compare January 27, 2025 13:36
@aduth aduth merged commit 919b856 into main Jan 27, 2025
@aduth aduth deleted the aduth-nil-default-analytics-events branch January 27, 2025 13:54
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