Debug and Monitor Functions in Couchbase 6
This course explores the use of the Couchbase debugger during the development phase of an eventing function. It also covers the variety of logs available to monitor the overall state and changes made to functions during their lifespan.
What you'll learn
The Couchbase eventing service allows us to respond to changes made to data through the medium of eventing functions. Like any application, these functions need to be developed and then maintained until they have served their purpose. In this course, Debug and Monitor Functions in Couchbase, you'll dive into the role of debugging in function development and the various options available to monitor functions throughout their lives. First, you'll begin by introducing you to the Couchbase eventing service and then create two simple eventing functions - one with an OnUpdate handler and another with an OnDelete handler. Next, You'll then explore how bugs in the function code can be identified using the built-in Couchbase debugger. This will cover the steps involved in activating the debugger, and use of the standard debug tools such as breakpoints and watch expressions. We also take a look at exception handling with try-catch blocks. Finally, You'll move on to the logging options available in Couchbase for the eventing service. This includes the application and system logs for functions, but also the audit feature which allows additional activities to be recorded. Furthermore, we use the explicit logging feature to generate logs and statistics to share with other teams - this includes the option to redact sensitive data from the log files. Once you have finished this course, you will be well-versed in the options available to manage an eventing function in Couchbase throughout its life - from development to monitoring and maintenance.
Table of contents
- Version Check 0m
- Course Prerequisites and Outline 2m
- Couchbase Functions and the Eventing Service 10m
- Adding a Couchbase Function 5m
- Best Practices for Couchbase Functions 6m
- Demo: Setting up Buckets for Couchbase Functions 5m
- Demo: Creating a Function to Handle Updates 7m
- Demo: Coding a Function to Cascade Deletes 5m
- An Introduction to Debugging in Couchbase 9m
- Demo: Introducing a Bug in the Function Code 6m
- Demo: The Step into Feature 10m
- Demo: Using Breakpoints When Debugging 7m
- Demo: The Step Over and Watch Features 6m
- Demo: Using the Step Out Feature When Debugging 3m
- Demo: The Application Log for Couchbase Functions 3m
- Demo: The System Log for Couchbase Functions 8m
- Demo: Exception Handling with try-catch Blocks 4m
- Auditing in Couchbase 6m
- Functions Logs and Stats 5m
- Demo: Auditing Changes to Function Settings 8m
- Demo: Auditing Function Debugging and Deletes 4m
- Demo: Explicit Logging and Redaction 8m
- Demo: Function Statistics Using the REST API 6m
- Demo: Function Statistics in the Couchbase Web UI 4m
- Demo: Cleaning up the Cluster 3m