Software development demand—and complexity— is increasing every day, creating a growing challenge for SRE and DevOps teams to keep up and simultaneously support ad hoc internal development needs. Interrupting the SRE workflow to provision and manage environments is costly. Self-service infrastructure for developers can solve this problem, but can be a massive headache to implement and manage.

To tackle this developer self-serve challenge, New Relic and WayScript built an integration that lets you quickly create a developer environment and automatically monitor it with a suite of observability tools. With WayScript and New Relic, you can:

  • Instantly spin up containerized developer environments in a single click.
  • Host full-fledged apps, set up internal microservices, and more, with built-in tools like a terminal and IDE.
  • Monitor and troubleshoot everything you build with an easy connection to the New Relic observability platform.

All developers can get started for free with New Relic and connect with WayScript as part of the more than 480 integrations included with New Relic’s observability platform. Free accounts with New Relic receive 100 GB per month of free data ingest, one full platform user, and unlimited basic users, queries, dashboards, and alerts. With preconfigured cloud-native environments from WayScript and rich observability capabilities from New Relic, you can focus on writing code instead of managing infrastructure. 

Automate development environment monitoring with New Relic and WayScript

WayScript is an internal developer platform (IDP) that makes it easy for software developers, SREs, and engineering leaders to take control of their team’s tools and developer environments. You can create self-service, cloud-based developer environments that scale, so SREs don't need to disrupt their workflows to provision one-off environments. WayScript is SOC-2 Type II certified. You can use it on the browser, the desktop app, or self-host WayScript on your own EC2 instance.

Developers can quickly build cron tasks, services, APIs, servers, data pipelines, and any other internal tool, without needing to learn new platforms and technologies. The cloud-based Docker environments come with built-in SSO, Kubernetes, internal data access, and now New Relic monitoring.

 

Use New Relic to monitor and troubleshoot the dev and prod applications hosted in the environments you created using WayScript.

With this new integration, you can automatically initialize New Relic to configure application performance monitoring (APM) agents, log forwarding, and more during the initial workspace setup in WayScript. You’ll get automatic visibility into the health of all pre-production, staging, and production environments.

How to create and monitor your environment in minutes

Now let’s try it out. There are just four main steps for connecting WayScript and New Relic:

  1. Open a WayScript workspace for your team.
  2. Create your first Lair for a containerized development environment.
  3. Enable the New Relic integration in WayScript.
  4. Set up a New Relic APM agent in your Lair.

1. Open a WayScript workspace for your team

In WayScript, each team gets access to a WayScript workspace. SRE and DevOps teams preconfigure integrations and set organizational standards for the workspace. Developers in turn rapidly create Lairs in the workspace, the basic building blocks of WayScript.

1. Sign up for a free WayScript account or sign in to an existing account. 

2. Create a workspace. Your WayScript workspace is where you and your team will collaborate on managing and shipping software. Note that you can invite others on your team to the workspace by selecting + Invite Team Member at the bottom left of the screen.

2. Create your first Lair in WayScript: a containerized dev environment

A Lair is a preconfigured, containerized, and flexible development environment for your code. They come stocked with handy tools like a cron scheduler, terminal, IDE and endpoint configuration.

From cloud terminals to perfectly mirrored environments, Lairs contain all the tools you need to develop and deploy production-ready applications using WayScript. Get application usage metrics, last deployment, last artifact, logs, and endpoints all from the Lair homepage.

To create a Lair in your workspace:

  1. Select the Lair tab in the left panel to navigate back to the Lair view.
  2. In the Lair view, select + New Lair in the top right of the screen. 
  3. To get started coding from scratch, select a pre-built template to customize or create a blank Lair. Follow this WayScript guide for inspiration and simple examples. For now, you can select the Flask template under Frameworks.

An example of creating a WayScript Lair by selecting a Flask template under Frameworks.

3. Enable the New Relic integration in WayScript

Note: To ensure your data moves seamlessly from WayScript to New Relic, make sure to complete the integration by following these steps before you deploy a Lair, which is covered in the next section.

1. Log in to New Relic or sign up for a free account.

2. Create a New Relic integration in WayScript. In WayScript, go to integrations by selecting the Workspace dropdown menu in the top left corner. Select Settings, and then Integrations. On the integrations page, select +New Integration, and then New Relic.

 

Create a New Relic integration in WayScript.

3. Enter your New Relic account_id and license_key. 

You can quickly get your New Relic account ID and license key from the WayScript data source installation page in New Relic.

4. In WayScript, complete the integration by selecting Create integration.

4. Set up APM for your Lairs (Python example)

Next, install a New Relic APM agent to monitor your Lair and anything you build inside it. WayScript supports development in any language, but this example uses the Python agent. To see all the APM agents available in New Relic, go to Add data, and filter for Application monitoring.

1. Configure the APM agent in the WayScript terminal. Select the Lair you want to monitor and select the Develop tab in the left panel. In the terminal that opens in the right panel, run these commands to generate the newrelic.ini config file for the Lair:

pip install newrelic 
newrelic-admin generate-config YOUR_LICENSE_KEY newrelic.ini
Screenshot of WayScript Develop tab

You can manually open the terminal by clicking the Show Terminal icon in the bottom left pane.

2. Add New Relic to your requirements.txt file. Open the code editor by selecting the Show Code icon in the bottom left pane. Select the requirements.txt file and add newrelic at the bottom of the file:

If your Lair does not have a requirements.txt file, you can create one directly in the code editor.

3. Add a deploy trigger. Open the Triggers panel by clicking the last icon, Show Triggers, in the bottom left pane. Click the + icon at the top of the Triggers panel and select deploy. Paste the following command in Command to Run:

NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program $YOUR_COMMAND_OPTIONS

Be sure to replace $YOUR_COMMAND_OPTIONS with your app’s command line, for example, python app.py.

Screenshot of adding a deploy trigger in WayScript

4. Test the connection. Invoke a process in your Lair. (Select the play icon under Run on the deploy trigger or navigate to the Lair endpoint.)

5. Deploy your Lair to productions. Select Deploy from the left panel to open the deploy view and click Deploy. This promotes your changes from your development environment to an identical production environment with unique endpoints and will automatically run your deploy trigger.

Screenshot of deploying a WayScript Lair to production

6. Wait a few minutes for New Relic to start receiving your data. It should take only 5-10 minutes.

 

New Relic receiving your data from a WayScript Lair.

That’s it! Now you should be able to see your Lair and applications in New Relic.