Skip to content

Split logged instance metrics into multiple lines when necessary #3690

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

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

pietroalbini
Copy link
Member

Heroku has a limit for log lines of 10,000 bytes, and when a line reaches that size the platform will automatically split it into multiple lines, breaking the tooling reading it.

To avoid that problem when outputting metrics, this commit implements the splitting on the application side when a line is longer than 5,000 bytes. The threshold is just 5,000 because the newline is inserted after the item that made the line too long, so it's possible that the actual lines will be longer than 5,000 bytes.

Fixes #3689.

Heroku has a limit for log lines of 10,000 bytes, and when a line
reaches that size the platform will automatically split it into multiple
lines, breaking the tooling reading it.

To avoid that problem when outputting metrics, this commit implements
the splitting on the application side when a line is longer than 5,000
bytes. The threshold is just 5,000 because the newline is inserted
*after* the item that made the line too long, so it's possible that the
actual lines will be longer than 5,000 bytes.
@rust-highfive
Copy link

r? @smarnach

(rust-highfive has picked a reviewer for you, use r? to override)

@jtgeibel
Copy link
Member

jtgeibel commented Jun 9, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Jun 9, 2021

📌 Commit 7604682 has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Jun 9, 2021

⌛ Testing commit 7604682 with merge d179227...

@bors
Copy link
Contributor

bors commented Jun 9, 2021

☀️ Test successful - checks-actions
Approved by: jtgeibel
Pushing d179227 to master...

@bors bors merged commit d179227 into rust-lang:master Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too many metrics for a single log line
5 participants