-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2909 from DataDog/maximo/consistent-query-string-…
…regexp-config Fixing DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP Empty Value Behavior
- Loading branch information
Showing
3 changed files
with
26 additions
and
4 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
23 changes: 23 additions & 0 deletions
23
tests/ext/root_span_url_with_query_params_obfuscation_empty.phpt
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--TEST-- | ||
Root span with http.url and unobfuscated query string with empty regex | ||
--INI-- | ||
datadog.trace.obfuscation_query_string_regexp= | ||
--ENV-- | ||
DD_TRACE_GENERATE_ROOT_SPAN=0 | ||
HTTPS=off | ||
HTTP_HOST=localhost:9999 | ||
SCRIPT_NAME=/foo.php | ||
REQUEST_URI=/users?application_key=123 | ||
QUERY_STRING=application_key=123 | ||
METHOD=GET | ||
--GET-- | ||
application_key=123 | ||
--FILE-- | ||
<?php | ||
DDTrace\start_span(); | ||
DDTrace\close_span(); | ||
$spans = dd_trace_serialize_closed_spans(); | ||
var_dump($spans[0]['meta']["http.url"]); | ||
?> | ||
--EXPECT-- | ||
string(48) "https://localhost:9999/users?application_key=123" |
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