Monitor Application Performance With New Relic on the Apcera Platform

apcera logoGuest author Simone Morellato is the director of technical product management at Apcera, which offers a secure applications runtime and workload management platform for modern IT.

Monitoring application performance has never been more important, and developers can choose from an increasingly broad set of tools. However, not every tool or solution is created equal. New Relic APM is powerful, simple, and easy to use on the Apcera platform. Here’s what the combination can do and how to get it working with Java applications—the same concepts apply for many other programming languages.

New Relic APM adds an extra layer of monitoring capabilities into applications deployed on the Apcera platform. This functionality can help developers and IT operations examine performance and troubleshoot applications in any stage of the development life cycle, from development through testing and production.

The Apcera platform is designed to let IT operations configure namespaces to divide hardware resources into multiple separate logical partitions. Namespaces can be created to align infrastructure partitioning with the development life cycle such as testing, development, and production. Or you can use namespaces to create sandboxes for developers to run their applications on the platform. Think about on how you create folders on your laptop to keep your files organized—on Apcera you create namespaces to keep your applications organized.

Apcera image 1

New Relic APM web console

With the Apcera/New Relic integration in place, developers pushing applications to the Apcera platform can also log in to the New Relic web console to view their applications being monitored. Click on the application name to see real-time statistics such as deployment reports, transaction tracing, cross-app tracing, and alert policies.

Deployment reports let IT ops see before-and-after pictures of the application’s performance when a change is deployed. Transaction tracing provides detailed visibility into the cause of application performance issues. Cross-app tracing traces transactions and offers a visual approach to view application data. Alert policies provide easy-to-set-up event-based notification rules for many different scenarios, including resource utilization and error rates.

Two ways to connect Apcera and New Relic

There are two convenient methods for developers to add New Relic APM to their applications running on the Apcera platform:

  1. Specify a package dependency on New Relic APM software:
apc app create my-java-app \
--depends-on package.newrelic-java-package \
--allow-egress
  1. Use the New Relic for Java staging pipeline:
apc app create my-java-app \
-sp /apcera::java-newrelic-pipeline \
--env-set “NEW_RELIC_LICENSE_KEY=<nr_secret_key>” \
--allow-egress

1. Specifying a package dependency

On the Apcera platform, a package is a runnable workload that contains data used to extend application capabilities. Customizable packages can be created to contain all the libraries needed for New Relic to function.

Before developers can specify New Relic as a package dependency, they first need to download the New Relic Java archive, and then create a configuration file for the package, as shown here:

Apcera image2

Sample New Relic stager (newrelic-java-package.conf)

Next, developers enter information such as the application name and the New Relic license key. After that, they simply run the apc package build command to create the package:

apc package build newrelic-java-package.conf

Once the package has been created, developers can submit the application to the Apcera platform using the package dependency method:

apc app create my-java-app \
--depends-on package.newrelic-java-package \
--allow-egress

This command loads the New Relic Java agent in the application. For each application deployed, a new package must be created with an updated name and license key if needed.

2. Using the New Relic for Java staging pipeline

The Apcera platform functionalities can be extended by adding custom stagers and by organizing them into staging pipelines. The staging process begins when code is submitted to the platform. If a Java application goes through a staging pipeline that includes a New Relic stager, all of the tasks required to compile and run the application with New Relic dependencies are executed automatically.

Apcera-image3

New Relic staging pipeline

The benefit of this method is that once the staging pipeline is created, the developers don’t have to worry about manually creating a package for every new application they want to push into the platform. The name field will automatically set and the developers need only know the New Relic license key to set in an environment variable.

Developers can also easily switch between the default Java stager and the customized New Relic stager as needed.

apc app create my-java-app \
-sp /apcera::java-newrelic-pipeline \
--env-set “NEW_RELIC_LICENSE_KEY=<nr_secret_key>” \
--allow-egress

The code snippet above shows how developers can create applications from the terminal using the customized New Relic stager. If the stager argument is not specified, the default Java staging pipeline will be used.

apc app create my-java-app \
--allow-egress

Furthermore, IT operations can use Apcera’s policy engine to control access to the New Relic packages and customized stagers. If organizations have separate New Relic accounts for applications used in development and production, they can use policy to isolate the New Relic packages. For example, if IT ops accesses the New Relic web console used to monitor only applications in development, they should not see applications running in production.

I hope that you can see the value New Relic brings to the extensible Apcera Platform by adding extensive monitoring capabilities to applications running on it. Combined with policy enforcement rules on packages and the staging pipeline, IT ops can easily add New Relic support for applications submitted to Apcera and also manage multiple New Relic accounts to complement the application life cycle.

For more information

Simone Morellato is Apcera’s Director of Technical Product Management. Before joining Apcera, Simone worked at Cloudian, a scale-out storage startup, where he led the technical and product marketing efforts for the company’s storage architectures. He has also held marketing, management, and technical positions at Riverbed, Cisco, Astute Networks, and Andiamo Systems (later acquired by Cisco). View posts by .

Interested in writing for New Relic Blog? Send us a pitch!