April 19, 2018 By Carlos Santana 2 min read

Log Analysis just got easier for serverless apps

In serverless applications, functions are small and need to execute in less amount of time in a stateless environment. Logging then becomes a challenge for DevOps to do Root Cause Analysis (RCA) or get insights about the behavior of their applications.

One logging approach is to add code to your functions to send logs to an external API, which can be a painful process for you and the performance of your applications. You don’t want to add complexity to your functions in terms of security, extra endpoints and protocols, as opposed to just concentrating on your business logic scoped to the single function. Because every millisecond counts when using serverless, you don’t want end users waiting while you send logs during action invocation.

IBM Cloud Functions now forward logs to the IBM Cloud Log Analysis service, where you can perform full-text search through all generated messages and query based on specific fields (like log-level).

In the case of IBM Cloud Functions, the platform takes care of the complexity, allowing you to collect and analyze logs using the ELK Stack (Elasticsearch, Logstash, and Kibana) as a centralized log management solution. Just print a line to standard out or error and your logs will be available in a secure, scalable way, without worrying about infrastructure for logging.

You can use the logging capabilities in the IBM Cloud to understand the behavior of your Serveless Applications.

No special instrumentation is required to collect the standard out (stdout) or standard error (stderr) logs.

User Logs

For example, you can now leverage serverless logs to provide the following features:

  • Provide an audit trail for an application

  • Detect problems in your application

  • Identify vulnerabilities

  • Troubleshoot your app

  • Trace your app across components in the Cloud Platform

  • Detect patterns that you can use to preempt actions that could affect your Serverless Application.

Activation Records

In addition to log lines, IBM Cloud Log Analysis also indexes the results (activation records) generated by IBM Cloud Functions. The results contain rich-metadata relevant for activations, such as their duration or result-code (success, error). All of the fields are queryable, and as such can help you understand how your Cloud Functions Actions are behaving.

With Kibana, you can do queries, build visualizations, and easily compose dashboards customized for your environment.  To build a visualization, first access the management tab in the Kibana dashboard, and then refresh the field list for the index pattern, so that terms become available for selection.

Get started with IBM Cloud Functions

For more information make sure you to check out the IBM Cloud Functions documentation.

More from

Protecting revenue and keeping applications online through intelligent routing

3 min read - IBM Build Partner GlobalDots helps some of the world’s leading brands keep their revenue-generating services running optimally at all times. Francesco Altomare of GlobalDots explains how embedding IBM technologies into the company’s Super content delivery network (CDN) offering helps address the biggest availability and performance challenges for customers. Intelligent network steering to protect revenue When the availability and performance of online applications and websites are truly critical, organizations typically use one or more CDNs to route web traffic intelligently. CDNs…

How a company transformed employee HR experience with an AI assistant

3 min read - IBM Build Partner Inspire for Solutions Development is a regional consulting firm that provides enterprise IT solutions across the Middle East. Jad Haddad, Head of AI at Inspire for Solutions Development has embraced the IBM watsonx™ AI and data platform to enhance the HR experience for its 450 employees. Next-gen HR for a next-gen workforce As a new generation of digital natives enters the workforce, we are seeing new expectations around the employee experience. Gen Z employees prefer an HR…

Fantasy Football trades: How IBM Granite foundation models drive personalized explainability for millions

4 min read - With almost 1,700 players in 272 games, the amount of data generated during the NFL football season is enormous. Fantasy football team owners are faced with complex decisions and an ocean of information. Deciding who to start, who to bench and who to trade each week can be a daunting task. It can also be a lot of fun—and that’s why the ESPN Fantasy app engages 12 million fantasy football users each year.  For the last 8 years, IBM has…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters