You are working on a serverless DevSecOps application using Oracle Functions.
You have deployed a Python function that uses the Oracle Cloud Infrastructure (OCI) Python SDK to stop any OCI Compute instance that does not comply with your corporate security standards.
There are 3 non-compliant OCI Compute instances.
However, when you invoke this function none of the instances were stopped.
How should you troubleshoot this? (Choose the best answer.)
Click on the arrows to vote for the correct answer
A. B. C. D.C.
The best answer to troubleshoot this issue is B. Enable function logging in the OCI console, include some print statements in your function code and use logs to troubleshoot this.
Explanation: Oracle Functions is a serverless platform that lets you run code in response to events and can be used for building DevSecOps applications. In this scenario, a Python function has been deployed on Oracle Functions to stop any OCI Compute instance that does not comply with corporate security standards. However, when the function is invoked, none of the instances were stopped.
To troubleshoot this issue, we need to find out what is happening when the function is invoked. The best way to do this is to enable function logging in the OCI console, which will allow you to see what is happening inside your function. To enable logging, you need to go to the OCI Console and navigate to your function. Then, click on the "Logging" tab and enable logging for your function.
Once logging is enabled, you can include some print statements in your function code to log information about what is happening. You can then use the logs to troubleshoot the issue. For example, you could log information about which instances were checked and whether they were compliant or not.
By examining the logs, you may be able to determine why the function is not stopping the non-compliant instances. For example, it could be a problem with the logic in the function, or it could be an issue with the OCI Python SDK.
Enabling function remote debugging (option C) or function tracing (option D) may also be useful, but these options are typically used for more complex issues that cannot be easily resolved using logging. Additionally, remote debugging and tracing may require additional setup and configuration, while logging is a simpler and more straightforward way to troubleshoot issues with your function.
Option A ("There is no way to troubleshoot a function running on Oracle Functions.") is not correct because there are several ways to troubleshoot functions running on Oracle Functions, including logging, remote debugging, and tracing.