NASA-PDS / planetary-data-cloud

PDS Cloud Migration documentation, issue, tracking and simple tools for assisting in the PDS hybrid cloud study and migration efforts.
Apache License 2.0
0 stars 0 forks source link

Add logging to cloud front function #31

Closed jimmie closed 1 year ago

jimmie commented 2 years ago

It's pretty simple to add logging to the cloud front function which rewrites registry URIs, and would be greatly valuable for debugging issues.

Logging output goes to a CloudWatch log group w/ the function name.

jordanpadams commented 1 year ago

@jimmie is this still something that needs to be done? and what is the urgency for this would you say? is this something we should really have in place before any data or more services go online?

jimmie commented 1 year ago

This is not terribly urgent, just a nice to have to help diagnose request routing problems as they arise. There are other ways to accomplish this however.

jordanpadams commented 1 year ago

@jimmie can you chat with @viviant100 or post what you were thinking for this?

jimmie commented 1 year ago

Currently, the cloud front function doesn't output anything regarding requests received, errors in the requests, etc. This makes it a bit difficult to diagnose issues, although we haven't had any in a while. It would be good to hook up Cloudwatch logs by inserting various console.log() statements throughout.

More details here: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions-logs.html

jordanpadams commented 1 year ago

thanks @jimmie! we will take a look

jordanpadams commented 1 year ago

@jimmie @viviant100 do we have any status on this?

viviant100 commented 1 year ago

Did some research. We can start with hooking up CloudWatch with CloudFront. @jimmie - Is this something we can do ourselves or need SA to setup? On a separate note, are you using edge functions?

jimmie commented 1 year ago

PR registry-api 264