File tree 5 files changed +7
-18
lines changed
5 files changed +7
-18
lines changed Original file line number Diff line number Diff line change 68
68
"protocol" : " HTTP/1.1" ,
69
69
"requestId" : " id=" ,
70
70
"requestTime" : " 04/Mar/2020:19:15:17 +0000" ,
71
- "requestTimeEpoch" : 1583349317135 ,
71
+ "requestTimeEpoch" : 1698901826000 ,
72
72
"resourceId" : null ,
73
73
"resourcePath" : " /my/path" ,
74
74
"stage" : " $default"
Original file line number Diff line number Diff line change 55
55
"routeKey" : " $default" ,
56
56
"stage" : " $default" ,
57
57
"time" : " 12/Mar/2020:19:03:58 +0000" ,
58
- "timeEpoch" : 1583348638390
58
+ "timeEpoch" : 1698901826000
59
59
},
60
60
"body" : " Hello from Lambda" ,
61
61
"pathParameters" : {
Original file line number Diff line number Diff line change @@ -428,21 +428,10 @@ def after(self, retval):
428
428
event_model .weight = 1 if gv .sampling_percentage == 0 else math .floor (
429
429
100 / gv .sampling_percentage )
430
430
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 ):
433
432
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
-
441
433
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 )
446
435
447
436
try :
448
437
# 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
2
2
lambda_decorators == 0.3.0
3
- moesifpythonrequest == 0.3.0
3
+ moesifpythonrequest == 0.3.1
Original file line number Diff line number Diff line change 28
28
# Versions should comply with PEP440. For a discussion on single-sourcing
29
29
# the version across setup.py and the project code, see
30
30
# https://packaging.python.org/en/latest/single_source_version.html
31
- version = '1.2.0 ' ,
31
+ version = '1.2.1 ' ,
32
32
33
33
description = 'Moesif Middleware to automatically log API calls from AWS Lambda functions' ,
34
34
long_description = long_description ,
You can’t perform that action at this time.
0 commit comments