Skip to main content
StreamNative Cloud allows you to monitor functions status, logs, and exceptions that are thrown when a function fails to be created, updated, or cannot work.

View function status

This section describes how to view function status using snctl, pulsarctl, pulsar-admin, and console.
If you want to monitor functions using snctl, pulsarctl or pulsar-admin, make sure you have set up your client tool. For more information, see set up client tools.
The following example introduces how to view the status of the Java exclamation function named exclamation.
To check the status of the function exclamation, run the following command:

View function logs

View the function logs using snctl

This section describes how to view function logs using snctl.
This example assumes you have installed snctl and initialized snctl configurations.
You can run the snctl logs command to view logs for a specific function. This table outlines the configuration options that are used for viewing function logs. For details about all supported fields, you can use the snctl logs -h command to list more information. The following command example shows how to view up to 60 lines of the exclamation function’s logs within the last 5 hours.
You should see the following output:

View the function logs on StreamNative Cloud Console

After you have successfully deployed a function, you can check its status, logs, and any exceptions through StreamNative Cloud Console.
The Functions option in the Resources area is only available if you have configured your environment and deployed at least one function.
  1. Log in to StreamNative Cloud Console.
  2. On the left navigation pane, in the Resources section, click Functions.
  3. Click the status of the function you just deployed to view the details page. In the figure below, the status is Running. screenshot of functions detail page
  4. On the functions detail page, click Logs to view a real-time log of the running function you selected. Click Exceptions to view any exceptions. screenshot of functions exception logs

View the function logs from log topics

You can use Pulsar Functions log topic feature to view the function logs. For more information, see Pulsar Functions log topic. Functions on StreamNative provide an alternative implementation of the Pulsar Functions log topic feature called sidecar mode, so you can use the feature in production environments with less performance impact. To enable the sidecar mode, user should provide the following configurations when deploying the function:
For more details about the custom-runtime-options, see Custom runtime options. Once the function is deployed with the sidecar mode, you can configure consumers to consume messages from the log topic.