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

Add more logging to background jobs #2066

Merged
merged 1 commit into from
Jan 5, 2020

Conversation

jtgeibel
Copy link
Member

@carols10cents
Copy link
Member

I'm a tiny bit concerned about how much this will increase our papertrail log volume... the update_downloads task runs every 10 min :-/ We can change our papertrail settings to filter out those log lines, but then what would the purpose be?

@jtgeibel
Copy link
Member Author

jtgeibel commented Jan 4, 2020

I think the additional log volume will be small compared to our web traffic logging. We can always scale it back if some of the lines end up being unhelpful. Mainly, I'm trying to investigate the occasional jumps in response times and while I don't think its related to background work, it would be nice to have timestamps to see the precise sequence of these events relative to web traffic.

Copy link
Contributor

@smarnach smarnach left a comment

Choose a reason for hiding this comment

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

This looks good to me.

We should consider using the log crate in the long run. It would give us control over log levels, e.g. making it easy to enable more verbose debug logging for the background worker temporarily to debug an issue. We are already using log in the server binary in a few places (e.g. here), which is a bit inconsistent.

I'm not concerned about the additional log volume. The update_downloads job will emit 432 additional log lines per day when run every ten minutes, and all the other changes combined result in less volume than that.

match &*args.next().unwrap_or_default() {

let job = args.next().unwrap_or_default();
println!("Enqueueing background job: {}", job);
Copy link
Contributor

Choose a reason for hiding this comment

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

When called locally without a command-line argument, the eror output isn't great, but I guess it's good enough – this isn't a tool meant to be used by many end users.

@smarnach
Copy link
Contributor

smarnach commented Jan 5, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jan 5, 2020

📌 Commit b32600e has been approved by smarnach

@bors
Copy link
Contributor

bors commented Jan 5, 2020

⌛ Testing commit b32600e with merge 54b879f...

bors added a commit that referenced this pull request Jan 5, 2020
@bors
Copy link
Contributor

bors commented Jan 5, 2020

☀️ Test successful - checks-travis
Approved by: smarnach
Pushing 54b879f to master...

@bors bors merged commit b32600e into rust-lang:master Jan 5, 2020
@jtgeibel jtgeibel deleted the prod/add-more-bg-job-logging branch January 6, 2020 01:40
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.

5 participants