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

feat: redact anonymous attributes within feature events #363

Merged

Conversation

keelerm84
Copy link
Member

No description provided.

@keelerm84 keelerm84 requested a review from a team January 22, 2024 16:32
Copy link

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);
Copy link
Member Author

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!

Copy link
Member

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);
Copy link
Member Author

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?

Copy link
Contributor

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

Base automatically changed from mk/sc-223829/inline to feat/inline-contexts January 23, 2024 14:28
@keelerm84 keelerm84 force-pushed the mk/sc-228721/anonymous-attribute-redaction branch from 20f2a3c to 1745a2c Compare January 24, 2024 19:14
@keelerm84 keelerm84 force-pushed the mk/sc-228721/anonymous-attribute-redaction branch from 1745a2c to ee736d0 Compare January 24, 2024 19:15
keelerm84 and others added 2 commits January 29, 2024 10:37
Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
.AddPrivateAttribute("/object/test")
.Kind("org", "org-key")
.Set("isCat", true)
.Set("email", "cat@cat.cat")
Copy link
Contributor

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

@keelerm84 keelerm84 merged commit a3afe69 into feat/inline-contexts Jan 29, 2024
18 checks passed
@keelerm84 keelerm84 deleted the mk/sc-228721/anonymous-attribute-redaction branch January 29, 2024 21:02
keelerm84 added a commit that referenced this pull request Mar 13, 2024
Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
keelerm84 added a commit that referenced this pull request Mar 15, 2024
Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
@github-actions github-actions bot mentioned this pull request Mar 15, 2024
cwaldren-ld added a commit that referenced this pull request Mar 19, 2024
🤖 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>
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.

3 participants