Browse Source

fix(relocation): Properly pass extra log info (#69780)

Alex Zaslavsky 10 months ago
parent
commit
88e9a4dcbc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/sentry/services/hybrid_cloud/import_export/impl.py

+ 3 - 3
src/sentry/services/hybrid_cloud/import_export/impl.py

@@ -186,7 +186,7 @@ class UniversalImportExportService(ImportExportService):
                     batch_model_name, import_flags, import_chunk_type, min_ordinal
                     batch_model_name, import_flags, import_chunk_type, min_ordinal
                 )
                 )
                 if existing_import_chunk is not None:
                 if existing_import_chunk is not None:
-                    logger.info("import_by_model.already_imported", extra)
+                    logger.info("import_by_model.already_imported", extra=extra)
                     return existing_import_chunk
                     return existing_import_chunk
 
 
                 ok_relocation_scopes = import_scope.value
                 ok_relocation_scopes = import_scope.value
@@ -331,7 +331,7 @@ class UniversalImportExportService(ImportExportService):
                 else:
                 else:
                     RegionImportChunk(**import_chunk_args).save()
                     RegionImportChunk(**import_chunk_args).save()
 
 
-                logger.info("import_by_model.successfully_imported", extra)
+                logger.info("import_by_model.successfully_imported", extra=extra)
                 return RpcImportOk(
                 return RpcImportOk(
                     mapped_pks=RpcPrimaryKeyMap.into_rpc(out_pk_map),
                     mapped_pks=RpcPrimaryKeyMap.into_rpc(out_pk_map),
                     min_ordinal=min_ordinal,
                     min_ordinal=min_ordinal,
@@ -365,7 +365,7 @@ class UniversalImportExportService(ImportExportService):
                             batch_model_name, import_flags, import_chunk_type, min_ordinal
                             batch_model_name, import_flags, import_chunk_type, min_ordinal
                         )
                         )
                         if existing_import_chunk is not None:
                         if existing_import_chunk is not None:
-                            logger.warning("import_by_model.lost_import_race", extra)
+                            logger.warning("import_by_model.lost_import_race", extra=extra)
                             return existing_import_chunk
                             return existing_import_chunk
                     except Exception:
                     except Exception:
                         sentry_sdk.capture_exception()
                         sentry_sdk.capture_exception()