Connector Improvement: Enhance documentation in Cloud Functions connector
CompletedFor anyone reading this request, please feel free to ask for more detail or clarification.
In the Cloud Functions documentation, the custom error handling section is only half a page. That section could benefit from code examples.
Also, the “How Can I View Detailed Logs for My Cloud Function" section is only one page (with the note that for for Non-4xx or 5xx errors, the recommendation is to contact Fivetran’s support team). That documentation section could also benefit from examples, and if that section was more thorough, the number of "Non-4xx or 5xx errors" support tickets could be reduced.
We ended up implementing CloudWatch logs ourselves, and though that took some extra development time, it wasn't that difficult. All it took was adding additional IAM permissions and adding log statements to our Cloud Function. Providing a simple example of CloudWatch setup in AWS Lambda Setup Guide would allow users to save development time, and it may increase users' interest in the CloudWatch connector (of course, similar additions would also have to be added for Google Cloud and Azure, but if the level of effort is as small as it was in AWS, these additions should have a pretty low level of effort).
-
Official comment
Thank you Nick,
I really appreciate your thoughtful responses and providing the example code.
I'll work to get that added in our general docs.
Best regards
Alison
-
Hi Nick,
Thank you for taking the time to share such a detailed and thoughtful feature request.
Would you be willing to share the code you used to integrate CloudWatch?
We always strive to make our documents as helpful as possible, that said I think we have enhanced the options for error handling since this post was made.
Best regards
Alison
-
Hi Alison,
Thank you for responding to this Feature Request.
I'm too busy at the moment to share instructions on IAM configuration, but once that configuration is set up, the code to integrate CloudWatch is simple. An example might look like this:
import json
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def lambda_handler(event, context):
logger.info("Beginning function execution ...")
#TODO implement
logger.info("Finishing function execution ...")
return {
"statusCode": 200,
"body": json.dumps("Hello from Lambda!")
}When you invoke the Lambda function for the first time, Cloudwatch will create a log group and a log stream that shows the two log lines written in the function above (assuming that you've configured IAM correctly). From there on out, all other function invocations will provide new log streams in that initially created Cloudwatch log group.
Best,
Nick
Please sign in to leave a comment.
Comments
3 comments