APM Solutions — FC Integrated with NewRelic

Background

Under the general trend of cloud-native, more and more developers have adopted container and serverless technologies when creating and deploying applications. New Relic is always paying attention to the evolution of cloud-native technology and the new challenges in the field of observability.

Traditional servers, virtual machines, containers, serverless functions, and developers’ operation and maintenance burdens are gradually reduced or eliminated. However, the demand for observable and observable insights continues to increase:

  • Link Tracking: Fine-grained single responsibility interconnection of multiple functions, remote function calls to access databases, and other cloud services require distributed link tracking.
  • Instance-Level Monitoring: Serverless black-boxes the concept of instances, but developers need to see the impact of events, such as cold starts caused by instance changes on business performance.
  • Rich Indicators: Some business key indicators, such as CPU, memory, network, and other cloud services, have not been provided yet, and the business side collects time and effort by themselves.
  • It uses metrics, logs, link tracking, and correlation to solve difficult distributed application problems.

In order to facilitate the integration of the third-party APM platform such as NewRelic, FC released Lifecycle Capability which allows APM agent to better monitor Serverless applications.

Next we introduce how to integrate NewRelic in FC, follow our steps and you will get your own serverless observability dashboard.

Solutions to integrate with NewRelic

  1. Register NewRelic and get your licence key (You can get your licence key when you create application)
  2. Register FunctionCompute .

An easy and simple way to install Funcraft is to download the executable binary files.

  1. Install Funcraft on the local machine. For more information, see installation instructions.
  2. Run fun --version to check whether the installation is successful.
  3. You need to configure funcraft with your own aliyun access key id and access key secret. Follow the steps in Configure Funcraft .Run fun config to configure Funcraft. Then configure Account ID, Access Key ID, Access Key Secret, and Default region name as prompted.
  1. Run the following command to clone the sample project to your local machine.

2. Run the following command to access the cloned sample project:

3. Replace licence key in template.yml with your own license key

4. Run the following command to deploy the function:

5. The following result is returned:

Application has been deployed successfully, and your function can be monitored by newrelic.

The application template has time trigger by dafault, it is triggerd every minite, and you can view a default dashboard with 1tps invocation.
You can also invoke function by fun invoke command or API calls.

View Dashboard

Original Source:

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store