-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit changes how the MongoDB queries from the Mongo Ruby Driver are sanitized. Previously, the sanitizer filtered almost the whole query, not allowing users to know which attributes and embedded documents were involved. Also, the arrays were collapsed, hiding all the elements except the first one. This might be problematic in Mongo queries as documents don't have a closed schema so the sanitization could hide some attributes. This change makes the Mongo query sanitization more similar to what we do with SQL queries using sql_lexer. Before: ```js { "$db": "?", "documents": "[?]", "insert": "posts", "lsid": "?", "ordered": true } ``` After: ```js { "$db": "?", "documents": [ { "_id": "?", "authors": [ { "_id": "?", "name": "?" }, { "_id": "?", "name": "?", "surname": "?" } ], "body": "?", "title": "?" } ], "insert": "posts", "lsid": "?", "ordered": true } ```
- Loading branch information
1 parent
0e9b72f
commit f19d9dc
Showing
4 changed files
with
34 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
bump: "patch" | ||
type: "change" | ||
--- | ||
|
||
The MongoDB query sanitization now shows all the attributes in the query at all levels. | ||
Only the actual values are filtered with a `?` character. Less MongoDB queries are now marked | ||
as N+1 queries when they weren't the exact same query. This increases the number of unique events | ||
AppSignal tracks for MongoDB queries. |
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