Skip to content
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

feat: introduce maxEntrySize, for enabling error message truncation #607

Merged
merged 5 commits into from
Oct 16, 2019

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Oct 15, 2019

introduces the configuration setting maxEntrySize which, if set, will make a best effort to truncate text log entries, such that they don't result in an exception, see:

https://cloud.google.com/logging/quotas

Note: as follow up, we should set this option to 256,000 on logging-bunyan, and logging-winston.

fixes #427

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 15, 2019
@codecov
Copy link

codecov bot commented Oct 15, 2019

Codecov Report

Merging #607 into master will decrease coverage by 0.36%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #607      +/-   ##
==========================================
- Coverage   97.21%   96.84%   -0.37%     
==========================================
  Files          10       10              
  Lines         431      444      +13     
  Branches       55       60       +5     
==========================================
+ Hits          419      430      +11     
- Partials       12       14       +2
Impacted Files Coverage Δ
src/log.ts 97.8% <85.71%> (-2.2%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57471f8...7248a14. Read the comment docs.

src/log.ts Outdated Show resolved Hide resolved
src/log.ts Show resolved Hide resolved
src/log.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@alexander-fenster alexander-fenster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one suggestion

Copy link
Contributor

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ nits

@bcoe bcoe merged commit 49efd49 into master Oct 16, 2019
@bcoe bcoe deleted the truncate-entries branch October 16, 2019 00:18
@xtellurian
Copy link

What are the units of maxEntrySize?

@techieshark
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Attempt to write logs with no transports
7 participants