-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: redact anonymous attributes within feature events #363
feat: redact anonymous attributes within feature events #363
Conversation
This pull request has been linked to Shortcut Story #228721: Anonymous attribute redaction for feature events. |
* @param context The context to redact. | ||
* @return JSON suitable for an analytics event. | ||
*/ | ||
JsonValue filter_with_anonymous_redaction(Context const& context); |
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.
Wasn't sure what the casing convention was for this repo so don't hesitate to nitpick!
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.
This file was written before we really solidified the standard we were using, and so it has tricked you.
The filter
function should be Filter
and yours should be FilterWithAnonymousRedaction
.
For the private function it would normally just be private, no name specialization. But yours needs name specialization for a conflict. So something like FilterInternal
.
We did put an abbreviated style guide here: https://github.com/launchdarkly/cpp-sdks/blob/main/CONTRIBUTING.md
* @param redactAnonymous Whether to redact all attributes from anonymous contexts. | ||
* @return JSON suitable for an analytics event. | ||
*/ | ||
JsonValue filter_(Context const& context, bool redactAnonymous); |
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.
Trailing _
the preference? Or something like internalFilter
?
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.
Should be able to call it just filter
, as an overload
e9ff718
to
5207b77
Compare
20f2a3c
to
1745a2c
Compare
1745a2c
to
ee736d0
Compare
Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
.AddPrivateAttribute("/object/test") | ||
.Kind("org", "org-key") | ||
.Set("isCat", true) | ||
.Set("email", "cat@cat.cat") |
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.
TIL that cat
is a real TLD (Catalan): https://www.gandi.net/en-US/domain/tld/cat
Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
🤖 I have created a release *beep* *boop* --- <details><summary>launchdarkly-cpp-client: 3.4.1</summary> ## [3.4.1](launchdarkly-cpp-client-v3.4.0...launchdarkly-cpp-client-v3.4.1) (2024-03-18) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-internal bumped from 0.5.4 to 0.6.0 </details> <details><summary>launchdarkly-cpp-internal: 0.6.0</summary> ## [0.6.0](launchdarkly-cpp-internal-v0.5.4...launchdarkly-cpp-internal-v0.6.0) (2024-03-18) ### Features * always inline contexts for feature events ([#362](#362)) ([bc77e89](bc77e89)) * redact anonymous attributes within feature events ([#363](#363)) ([85fe237](85fe237)) ### Bug Fixes * handle omitted evaluation result value when deserializing client-side JSON payload ([#368](#368)) ([334ea51](334ea51)) </details> <details><summary>launchdarkly-cpp-server: 3.3.3</summary> ## [3.3.3](launchdarkly-cpp-server-v3.3.2...launchdarkly-cpp-server-v3.3.3) (2024-03-18) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-internal bumped from 0.5.4 to 0.6.0 </details> <details><summary>launchdarkly-cpp-server-redis-source: 2.1.3</summary> ## [2.1.3](launchdarkly-cpp-server-redis-source-v2.1.2...launchdarkly-cpp-server-redis-source-v2.1.3) (2024-03-18) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-server bumped from 3.3.2 to 3.3.3 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
No description provided.