Skip to content

Commit fb29862

Browse files
authored
Merge branch 'master' into mrickard/bump-version-to-2.6.6
2 parents a6bb7a2 + 02391d8 commit fb29862

File tree

10 files changed

+808
-515
lines changed

10 files changed

+808
-515
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/python:3.7
5+
- image: circleci/python:3.9
66
steps:
77
- checkout
88
- restore_cache:
@@ -18,7 +18,7 @@ jobs:
1818

1919
lint:
2020
docker:
21-
- image: circleci/python:3.7
21+
- image: circleci/python:3.9
2222
steps:
2323
- checkout
2424
- restore_cache:
@@ -31,7 +31,7 @@ jobs:
3131
3232
test:
3333
docker:
34-
- image: circleci/python:3.7
34+
- image: circleci/python:3.9
3535
steps:
3636
- checkout
3737
- restore_cache:
@@ -43,7 +43,7 @@ jobs:
4343

4444
release:
4545
docker:
46-
- image: circleci/python:3.7
46+
- image: circleci/python:3.9
4747
steps:
4848
- checkout
4949
- restore_cache:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ repos:
33
rev: 22.3.0
44
hooks:
55
- id: black
6-
language_version: python3.7
6+
language_version: python3.9

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.7
1+
FROM python:3.9
22
RUN apt-get update
33
RUN apt-get install -y zip
44

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,24 @@ If your payload exceeds this size, you will need to split it into pieces:
7171

7272
<https://github.com/newrelic/aws-log-ingestion/blob/1430a247f1fb5feb844f0707838a6ef48d21fc41/src/function.py#L292-L306>
7373

74-
The payload should be gzipped before sending:
74+
The payload should be utf-8 encoded and then gzipped before sending:
7575

7676
<https://github.com/newrelic/aws-log-ingestion/blob/1430a247f1fb5feb844f0707838a6ef48d21fc41/src/function.py#L298>
7777

78+
The following GNU coreutils Bash command will reproduce the desired payload encoding and compression:
79+
80+
```sh
81+
xclip -sel clip -o | iconv -cf utf-8 | gzip > payload.gz
82+
```
83+
7884
Required headers include:
7985

8086
* <https://github.com/newrelic/aws-log-ingestion/blob/1430a247f1fb5feb844f0707838a6ef48d21fc41/src/function.py#L360-L361>
81-
* `Content-Length`
82-
* `Host`
87+
* `Accept-Encoding: gzip`
88+
* `Content-Length: <calculated when request is sent>`
89+
* `Host: <calculated when request is sent>`
8390

84-
The payload should include the following elements (properly escaped):
91+
The payload should include the following (properly escaped) elements[^1]:
8592

8693
```json
8794
{
@@ -95,7 +102,4 @@ The payload should include the following elements (properly escaped):
95102
}
96103
```
97104

98-
*Notes:*
99-
100-
*- Replace <your_xyz> elements with your content.*
101-
*- Example `log_stream_name` like `2022/05/17/[$LATEST]30dce751bc1a4e7497eb644171d70153`*
105+
[^1]: Replace <your_xyz> elements with your content, for example: `"log_stream_name": "2022/05/17/[$LATEST]30dce751bc1a4e7497eb644171d70153"`.

0 commit comments

Comments
 (0)