File tree Expand file tree Collapse file tree 5 files changed +7
-18
lines changed Expand file tree Collapse file tree 5 files changed +7
-18
lines changed Original file line number Diff line number Diff line change 6868 "protocol" : " HTTP/1.1" ,
6969 "requestId" : " id=" ,
7070 "requestTime" : " 04/Mar/2020:19:15:17 +0000" ,
71- "requestTimeEpoch" : 1583349317135 ,
71+ "requestTimeEpoch" : 1698901826000 ,
7272 "resourceId" : null ,
7373 "resourcePath" : " /my/path" ,
7474 "stage" : " $default"
Original file line number Diff line number Diff line change 5555 "routeKey" : " $default" ,
5656 "stage" : " $default" ,
5757 "time" : " 12/Mar/2020:19:03:58 +0000" ,
58- "timeEpoch" : 1583348638390
58+ "timeEpoch" : 1698901826000
5959 },
6060 "body" : " Hello from Lambda" ,
6161 "pathParameters" : {
Original file line number Diff line number Diff line change @@ -428,21 +428,10 @@ def after(self, retval):
428428 event_model .weight = 1 if gv .sampling_percentage == 0 else math .floor (
429429 100 / gv .sampling_percentage )
430430
431- if self .DEBUG :
432- start_time_sending_event_w_rsp = datetime .utcnow ()
431+ if datetime .utcnow () > gv .last_updated_time + timedelta (seconds = gv .refresh_config_time_seconds ):
433432 event_send = self .api_client .create_event (event_model )
434- end_time_sending_event_w_rsp = datetime .utcnow ()
435- print ("[moesif] sampling_percentage" + str (
436- gv .sampling_percentage ) + " and random percentage: " + str (random_percentage ))
437- print ("[moesif] Time took in sending event to moesif in millisecond - " + str (
438- get_time_took_in_ms (start_time_sending_event_w_rsp , end_time_sending_event_w_rsp )))
439- print ('[moesif] Event Sent successfully ' + str (event_send ))
440-
441433 else :
442- if datetime .utcnow () > gv .last_updated_time + timedelta (seconds = gv .refresh_config_time_seconds ):
443- event_send = self .api_client .create_event (event_model )
444- else :
445- self .api_client .create_event (event_model )
434+ self .api_client .create_event (event_model )
446435
447436 try :
448437 # Check if we need to update config
Original file line number Diff line number Diff line change 1- moesifapi == 1.4.0
1+ moesifapi == 1.4.1
22lambda_decorators == 0.3.0
3- moesifpythonrequest == 0.3.0
3+ moesifpythonrequest == 0.3.1
Original file line number Diff line number Diff line change 2828 # Versions should comply with PEP440. For a discussion on single-sourcing
2929 # the version across setup.py and the project code, see
3030 # https://packaging.python.org/en/latest/single_source_version.html
31- version = '1.2.0 ' ,
31+ version = '1.2.1 ' ,
3232
3333 description = 'Moesif Middleware to automatically log API calls from AWS Lambda functions' ,
3434 long_description = long_description ,
You can’t perform that action at this time.
0 commit comments