Skip to content

Commit

Permalink
Merge pull request #2299 from blackflux/dev
Browse files Browse the repository at this point in the history
[Gally]: master <- dev
  • Loading branch information
simlu authored Nov 23, 2020
2 parents c9eb69f + 695e545 commit 5955cfc
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 113 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
},
"homepage": "https://github.com/blackflux/lambda-monitor#readme",
"dependencies": {
"aws-sdk": "2.796.0",
"aws-sdk-wrap": "4.5.2",
"aws-sdk": "2.797.0",
"aws-sdk-wrap": "4.5.3",
"datadog-light": "2.0.9",
"lambda-async": "1.0.9",
"lambda-cfn-hook": "1.2.32",
"lambda-cfn-hook": "1.2.34",
"lambda-monitor-logger": "2.4.6",
"lodash.get": "4.4.2",
"lru-cache-ext": "1.2.3",
Expand All @@ -58,7 +58,7 @@
"smart-fs": "1.12.1"
},
"devDependencies": {
"@babel/cli": "7.12.1",
"@babel/cli": "7.12.7",
"@babel/core": "7.12.3",
"@babel/register": "7.12.1",
"@blackflux/eslint-plugin-rules": "1.3.41",
Expand All @@ -67,7 +67,7 @@
"babel-preset-latest-node": "5.1.1",
"chai": "4.2.0",
"coveralls": "3.1.0",
"eslint": "7.13.0",
"eslint": "7.14.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-json": "2.1.2",
Expand All @@ -81,7 +81,7 @@
"node-tdd": "2.18.11",
"nyc": "15.1.0",
"robo-config": "3.10.3",
"semantic-release": "17.2.3"
"semantic-release": "17.3.0"
},
"licenses": [
{
Expand Down
5 changes: 3 additions & 2 deletions src/logic/logger/message/s3-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ module.exports = ({
logEvent,
level
}) => {
const [year, month, day] = new Date(logEvent.timestamp).toISOString().split('T')[0].split('-');
const [year, month, day, hour] = new Date(logEvent.timestamp)
.toISOString().split(/[-T:]/);
s3PutGzipObject.enqueue(
process.env.LOG_STREAM_BUCKET_NAME,
`${logGroup.slice(1)}/${year}/${month}/${day}/${level}-${logEvent.id}.json.gz`,
`${logGroup.slice(1)}/${year}/${month}/${day}/${hour}/${level}-${logEvent.id}.json.gz`,
JSON.stringify(logEvent)
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705525399286472041989494361812797248982273749060812800.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/03/warning-33705525399286472041989494361812797248982273749060812800.json.gz",
"body": "1f8b0800000000000203258c410ac3201000bf227bf112e8aa6bdccd0bfa885e52945488a6c4343d94febd422f731886f9408e30817301bdb7de89581e295824232c24e446c3c606099658d8dae002098ed82523c200472ea91d7379c264bc31848caed30cd07d9b97d4f7d7b9c635ed4a6f67dacf9cde5a95dc5aae8bdaaa2a5b7cad49e935df2f8f7fa96f15be3ffc72d9799c000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/error-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/error-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b08000000000002030dcc3b0e83400c05c0ab44ae29ecf5e761fa9c202d0d525611c542b4d045b93bb453cc8fd6374da40a76034c34c185c5359cd9e111812c60066b165383b88920c6540b1ae85c5b3dcea57d69121731f61119e103dd7e2c9f7af7afbdd5c7b3f7bdcfdbbcd1ff02b38cd00b76000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{
"scope": "https://log-stream-bucket-name.s3.amazonaws.com:443",
"method": "PUT",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"path": "/aws/lambda/peg-solitiare-dev-overview/2017/11/23/02/warning-33705477413970201536500575666792700703924347154117689346.json.gz",
"body": "1f8b080000000000020315cc3b0ec2300c00d0ab44995b6437b1ddf41c8c5d2262aa08fa5113ca80b83b657dc3fbd89cec609d13202fe2d105810e901c13000931b3844e00045ce8bcf382e41185fbe03cdbc6d63c6ba971deec8084e8817a09ccd4d8d34b9cf4ec379ddab23e73cd71d736e9d1ae87ee47d6f760aeb13ccc3f49667d5513ef557783170053f4b62ea98ccbb8d8ef0f528871a8a9000000",
"status": 200,
"response": ""
Expand Down
Loading

0 comments on commit 5955cfc

Please sign in to comment.