Skip to content

Commit

Permalink
Add file-id to all transformer logging
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGalewsky authored and ponyisi committed Dec 5, 2024
1 parent bea911f commit c2f7aec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def put_file_complete(self, rec: FileCompleteRecord):
tries=MAX_RETRIES,
delay=RETRY_DELAY)
self.logger.info("Put file complete.", extra={'requestId': rec.request_id,
"file-id": rec.file_id,
"place": PLACE,
"file_path": rec.file_path})
except requests.exceptions.ConnectionError:
Expand Down
8 changes: 6 additions & 2 deletions transformer_sidecar/src/transformer_sidecar/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,16 @@ def upload_file(source_path: Path,
object_name = source_path.name

logger.info("Uploading file to object store.",
extra={'requestId': request_id, "place": PLACE,
extra={'requestId': request_id,
"file-id": rec.file_id,
"place": PLACE,
"objectName": object_name})
t0 = time.time()
object_store.upload_file(request_id, object_name, file_to_upload.as_posix())
logger.info("File uploaded to object store.",
extra={'requestId': request_id, "place": PLACE,
extra={'requestId': request_id,
"file-id": rec.file_id,
"place": PLACE,
"objectName": object_name,
"elapsed": time.time()-t0})

Expand Down

0 comments on commit c2f7aec

Please sign in to comment.