We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8ddc07 commit 67383b2Copy full SHA for 67383b2
1 file changed
sentry_sdk/integrations/pymongo.py
@@ -131,6 +131,7 @@ def started(self, event: "CommandStartedEvent") -> None:
131
132
db_data = _get_db_data(event)
133
134
+ lsid = command.pop("lsid", None)
135
if not should_send_default_pii():
136
command = _strip_pii(command)
137
@@ -184,8 +185,8 @@ def started(self, event: "CommandStartedEvent") -> None:
184
185
data.update(db_data)
186
187
try:
- lsid = command.pop("lsid")["id"]
188
- data["operation_ids"]["session"] = str(lsid)
+ lsid_id = lsid["id"]
189
+ data["operation_ids"]["session"] = str(lsid_id)
190
except KeyError:
191
pass
192
0 commit comments