• /
  • EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

CloudWatch fallback

You can ship New Relic Lambda monitoring data in a few different ways depending on your needs. The option that provides the strongest performance of your function and the strongest fail-safe includes configuring CloudWatch as a fallback. This means that you will ship telemetry to New Relic through the extension and, if there's a problem with the extension, New Relic will still receive payloads through CloudWatch.

Benefits of the CloudWatch fallback:

  • Independent execution: Captures all logs from CloudWatch independently of your function's execution. It is very unlikely to interfere with your function's normal operation, or impact the invocation duration of your function.
  • Works with secured networks: Useful for functions in a VPC that can't have outbound traffic to New Relic.
  • Enables enhanced monitoring: Needed for other forms of infra and database telemetry. To learn more, see our Amazon RDS Enhanced Monitoring integration docmentation.

While this shipping option offers the strongest fail-safe, it's important to note that the AWS CloudWatch service can generate a lot of data. Keep data ingest in mind when thinking about costs and which New Relic pricing plan you choose.

How the CloudWatch fallback works

If the extension fails to start up, otherwise known as noop mode, or crashes, it will fail to encode the NR_LAMBDA_MONITORING line generated by our agents. The NR_LAMBDA_MONITORING line will appear in CloudWatch logs instead. If the newrelic-log-ingestion function is installed in the same region as your function, configured to ship payloads, and is triggered by your function's CloudWatch log group, then it can act as a fallback to the extension for shipping payloads.

Before you begin

Before you set up a fallback option you will need to complete the following:

  • Install the newrelic-log-ingestion function in the AWS region where you want to send your logs from.
  • If sending logs, create a filter pattern equal to null, or create a custom pattern to match the function logs you want to send. New Relic will receive the CloudWatch logs for your function. To avoid duplicate logs, the extension needs to have its log shipping disabled. The extension's log shipping is disabled by default.

Here are some best practices before updating your New Relic Lambda layer:

  • Before you update to a newer layer version, keep in mind that the latest layer might introduce changes that break the extension or a third party dependency.
  • Pin a layer version that is known to work well for your function and only update to a newer layer version as needed to resolve bugs, obtain new features and security patches, or because an agent has EOL'd.
  • Carefully review all changes and release notes and test in a dev or staging environment before deploying a new layer to production.

Implementation options

There are three ways you can implement a CloudWatch fallback:

  1. Enable the extension for telemetry payloads and ship logs via CloudWatch: In this scenario, telemetry payloads are shipped through the extension and logs through CloudWatch, and in the event the extension fails, payloads as well.
  2. Extension enabled for telemetry payloads and logs: In this scenario, telemetry payloads and logs are shipped through the extension.
  3. Extension disabled: In this scenario, CloudWatch is always used to send logs and payloads.
Copyright © 2024 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.