chore(plugin-server): add property for anonymized created_at #21143
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.
Problem
Some customers really don't want accurate timestamps in their data, and these
created_at
ones were totally out of their control.Changes
Add
$truncate_created_at
property which truncates to the day.I'm actually not in love with adding this based on a single customer request. Magical properties easily become long-term maintenance burdens. Should the customer write a plugin for this, and then we check for a
created_at
field on the event instead of hardcodingnow()
?Is it safe to give users control over that field? I actually don't know if there is product fallout from "breaking"
created_at
, I'm assuming it's just a debug column... but if it's a debug column for us, then giving them control will make it very confusing.Does this work well for both Cloud and self-hosted?
Yes.
How did you test this code?
Unit test.