Skip to content

Commit

Permalink
update gcp collector fix logGroupName and time * 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
red0sena committed Nov 8, 2023
1 parent c4cc06e commit 94c9c7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collector/spot-dataset/gcp/lambda/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def upload_cloudwatch(df_current, timestamp):
cw_client = boto3.client('logs')

log_event = {
'timestamp': int(timestamp.timestamp()),
'timestamp': int(timestamp.timestamp()) * 1000,
'message': f'GCPONDEMAND: {ondemand_count} GCPSPOT: {spot_count}'
}

cw_client.put_log_events(
logGroupName=GCP_CONST.LOG_GROUP_NAME,
logGroupName=GCP_CONST.SPOT_DATA_COLLECTION_LOG_GROUP_NAME,
logStreamName=GCP_CONST.LOG_STREAM_NAME,
logEvents=[log_event]
)
Expand Down

0 comments on commit 94c9c7a

Please sign in to comment.