diff --git a/sentry_sdk/integrations/pymongo.py b/sentry_sdk/integrations/pymongo.py index 6cd74b54c0..ac66d4b12c 100644 --- a/sentry_sdk/integrations/pymongo.py +++ b/sentry_sdk/integrations/pymongo.py @@ -140,6 +140,7 @@ def started(self, event: "CommandStartedEvent") -> None: collection_name = command.get(event.command_name) operation_name = event.command_name + command.pop("lsid", None) if has_data_collection_enabled(client.options): if not client.options["data_collection"]["database_query_data"]: command = _strip_pii(command)