-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(appsec: extension): create new function for automated user signu…
…p event Signed-off-by: Alexandre Rulleau <[email protected]>
- Loading branch information
Showing
22 changed files
with
285 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,12 @@ include __DIR__ . '/inc/ddtrace_version.php'; | |
|
||
ddtrace_version_at_least('0.79.0'); | ||
|
||
track_user_signup_event("Admin", "1234", | ||
track_user_signup_event("sdkID", | ||
[ | ||
"value" => "something", | ||
"metadata" => "some other metadata", | ||
"email" => "[email protected]" | ||
], false); | ||
]); | ||
|
||
rshutdown(); | ||
|
||
|
@@ -34,7 +34,7 @@ root_span_get_meta(): | |
Array | ||
( | ||
[runtime-id] => %s | ||
[usr.id] => Admin | ||
[usr.id] => sdkID | ||
[_dd.appsec.events.users.signup.sdk] => true | ||
[appsec.events.users.signup.value] => something | ||
[appsec.events.users.signup.metadata] => some other metadata | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,18 +8,17 @@ DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE=anon | |
--FILE-- | ||
<?php | ||
use function datadog\appsec\testing\root_span_get_meta; | ||
use function datadog\appsec\track_user_signup_event; | ||
use function datadog\appsec\track_user_signup_event_automated; | ||
include __DIR__ . '/inc/ddtrace_version.php'; | ||
|
||
ddtrace_version_at_least('0.79.0'); | ||
|
||
track_user_signup_event("1234", "1234", | ||
track_user_signup_event_automated("login", "automatedID", | ||
[ | ||
"value" => "something", | ||
"metadata" => "some other metadata", | ||
"email" => "[email protected]" | ||
], | ||
true); | ||
]); | ||
|
||
echo "root_span_get_meta():\n"; | ||
print_r(root_span_get_meta()); | ||
|
@@ -29,11 +28,10 @@ root_span_get_meta(): | |
Array | ||
( | ||
[runtime-id] => %s | ||
[usr.id] => anon_03ac674216f3e15c761ee1a5e255f067 | ||
[usr.id] => anon_b3ddafd7029d645b44fb990eea55b003 | ||
[_dd.appsec.usr.id] => anon_b3ddafd7029d645b44fb990eea55b003 | ||
[_dd.appsec.events.users.signup.auto.mode] => anonymization | ||
[appsec.events.users.signup.usr.login] => anon_428821350e9691491f616b754cd8315f | ||
[_dd.appsec.usr.login] => anon_428821350e9691491f616b754cd8315f | ||
[appsec.events.users.signup.track] => true | ||
[_dd.appsec.usr.id] => anon_03ac674216f3e15c761ee1a5e255f067 | ||
[appsec.events.users.signup.usr.id] => anon_03ac674216f3e15c761ee1a5e255f067 | ||
[_dd.appsec.usr.login] => anon_03ac674216f3e15c761ee1a5e255f067 | ||
[appsec.events.users.signup.usr.login] => anon_03ac674216f3e15c761ee1a5e255f067 | ||
) |
Oops, something went wrong.