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

Handle recoverable logging errors. Report log delivery exception metrics #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KevinPike
Copy link
Contributor

Issue #, if available:

n/a

Description of changes:

Handle recoverable logging errors

CreateLogGroup and CreateLogStream "ResourceAlreadyExists" exceptions are not exceptional and logging can continue. I couldn't find any documentation on TPS for CreateLogGroup. DescribeLogGroup has a TPS of 5 so it seems like something we can do away with. I've observed CreateLogStream be called twice and return ResourceAlreadyExists, presumably due to a temporary network error.

I've observed PutLogEvents returning "DataAlreadyAcceptedException" and "InvalidSequenceTokenException". Both errors provide the sequence token that should be used next. Without reading that token, the logger cannot send any more logs. I suspect "DataAlreadyAcceptedException" happens with temporary network errors that are retried. I'm not sure why "InvalidSequenceTokenException" happens.

Report log delivery exception metrics

Today, when a go resource provider runs into logging errors, you have no indication of why -- just missing logs. This change follows the java plugin by reporting LogDeliveryExceptions for each AWS call that can fail in the logging provider.

Report metric time as UTC

Metrics were rejected because time wasn't UTC. I've been running the UTC submission code for weeks now with no problem.

Upgrade go SDK

PutLogEvents errors weren't available in the sdk version previously used. I upgraded the aws sdk to latest.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@elliottjro
Copy link

this has been approved from a while back @kddejong do you think you could approve + merge this?

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.

3 participants