-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metrics: skip empty lines in process cloudflare #3765
Conversation
a98a888
to
c02c46c
Compare
cc @targos |
Is it normal to have empty lines? |
I don't know. I noticed while processing an example file, and verified the error is not logged after adding the length check to skip processing. #3697 (comment) Once merged and deployed, hopefully most or all of JSON.parse errors go away, making debugging easier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is good to merge, and |
Deployed, and verified that errors are no longer logged. BeforeEVENT TYPE: OBJECT_FINALIZE
Node version is: v20.14.0
BUCKET cloudflare-logs-nodejs
FILENAME 20240625/20240625T193221Z_20240625T193327Z_121d0e03.log.gz
PROCESSEDFILENAME 20240625/20240625T193221Z_20240625T193327Z
INSIDE CREATE PIPELINE
String length: 23750258
Array Length: 48452
SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at /usr/src/app/process-cloudflare.js:164:34 at callback (/usr/src/app/node_modules/@google-cloud/storage/build/src/file.js:1624:17) at /usr/src/app/node_modules/@google-cloud/storage/build/src/file.js:1640:87 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Upload complete
rss 358.32 MB
heapTotal 57.23 MB
heapUsed 44.96 MB
external 26.86 MB
arrayBuffers 23.75 MB AfterEVENT TYPE: OBJECT_FINALIZE
Node version is: v20.15.0
BUCKET cloudflare-logs-nodejs
FILENAME 20240625/20240625T193633Z_20240625T193744Z_8987830a.log.gz
PROCESSEDFILENAME 20240625/20240625T193633Z_20240625T193744Z
INSIDE CREATE PIPELINE
String length: 9327443
Array Length: 18849
Upload complete
rss 157.49 MB
heapTotal 31.18 MB
heapUsed 25.12 MB
external 12.45 MB
arrayBuffers 9.35 MB |
Refs: #3697 (comment)