Skip to content

Conversation

@stevezau
Copy link
Contributor

@stevezau stevezau commented Nov 11, 2016

Hi,

This PR is to refactor the lambda function.

Updates

  • Make use of sourceName and sourceHost
  • Auto detect if json format
  • Better detection of requestID
  • Buffer to S3 on failed due to rate limiting or Sumo connection issues
  • add option for only clear text vs json?
  • merge both scripts into one

context.fail(e);
}

var awslogsData = JSON.parse(buffer.toString('ascii'));

Choose a reason for hiding this comment

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

is "ascii" the encoding? is that a safe assumption?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thing is, i didn't change it, that's how it was previously. should probably be utf8.

Copy link
Contributor

Choose a reason for hiding this comment

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

lastRequestID = rs[1];
}
val.requestID = lastRequestID;
val.logStream = stream;
Copy link
Contributor

@duchatran duchatran Nov 14, 2016

Choose a reason for hiding this comment

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

@stevezau : we need to make logStream and logGroup on by default, otherwise data sent by this function will not be compatible with our Lambda app.

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.

4 participants