Skip to content

Commit

Permalink
chore(native): Add snippets to strip sensitive data with set_tag and …
Browse files Browse the repository at this point in the history
…set_user (#9826)

* adds sensitive data snippets for native

* adds sensitive data snippets for native
  • Loading branch information
kahest committed Apr 28, 2024
1 parent c5c76b7 commit ee71cdb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions platform-includes/sensitive-data/set-tag/native.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The Native SDK maintains all data in a single global scope.

```c
#include <sentry.h>

sentry_set_tag("birthday", checksum_or_hash("08/12/1990"));
```
11 changes: 11 additions & 0 deletions platform-includes/sensitive-data/set-user/native.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The Native SDK maintains all data in a single global scope.

```c
#include <sentry.h>

sentry_value_t user = sentry_value_new_object();
sentry_value_set_by_key(user, "id", sentry_value_new_int32(client_user->id));
// OR
sentry_value_set_by_key(user, "username", sentry_value_new_string(client_user->username));
sentry_set_user(user);
```

0 comments on commit ee71cdb

Please sign in to comment.