• /
  • Log in
  • Free account

APM (host-based) subscription usage

Original pricing plan

Important

This doc is for accounts on our original Product-based pricing. If you're on the newer pricing plan, see New Relic One pricing plan. Not sure which you're on? See Overview of pricing plans.

For accounts on our original pricing plan, this doc explains how New Relic calculates billable usage for APM accounts that have host-based pricing (not CU-based pricing). This document also provides available subscription usage attributes and example NRQL queries to use in the New Relic UI or with API calls.

Data generation

Once per day, an APM account will generate an NrDailyUsage event for:

  • Every application instance that existed during the last 24 hours
  • Every unique host on which an application instance ran during the last 24 hours

These two types of events allow your usage data to be queried and analyzed in many different ways. To query the application events, use a usageType attribute value of Application. To query the host events, use a usageType attribute value of Host.

All APM events use a productLine attribute value of APM. For more information, see APM query examples.

Usage calculations

For host-based APM pricing, monthly billable usage is determined by the number of equivalent hosts used during that month. An equivalent host is defined as: 750 hours (standardized number of monthly hours) of connection to New Relic by a host or multiple hosts. For more on this calculation, see host-based pricing.

Tip

Only the account Owner and Admins can view the usage UI. However, anyone in your account can query usage data using the NrDailyUsage event.

To get an estimate of the current month's billable usage:

  1. Go to: account dropdown > Account settings > Usage.
  2. On the APM usage page, set the time picker to Current month.
  3. See the Avg daily equivalent hosts for an account or grouping of accounts.

The UI is meant to estimate your host usage but, especially for cloud environments, your usage may go up or down over time. For more information about the usage UI, see Introduction to New Relic subscription usage data.

Table definitions

Here are definitions of the column headers in the UI table and CSV files. The columns you see depend on the Group by option selected at the top of the page.

Header

Definition

Account name

The name of the account. This can be a standalone account, a master account or a customer partnership.

Account ID

New Relic account ID.

Host ID

The unique identifier for that host. If the host is in AWS, we use the AWS-provided instance ID. For other hosts, New Relic assigns a host ID. For more about how this value is created, see hostID.

Agent hostname

The name of the host, as reported by the agent. For more about this value, see agentHostname.

Average daily equivalent hosts

Average equivalent hosts for that day. Calculated as the total number of hours reported for all unique hosts in a day, divided by 24. For more on how this is calculated, see Host-based pricing.

% of total usage

The percentage of the total usage used.

General attributes

The following are general (not APM-specific) account-related attributes. These attributes can help you understand how your accounts and sub-accounts are using New Relic products.

Attribute

Description

consumingAccountId

ID of the New Relic account that is directly responsible for the stored events, as determined from the license key used.

consumingAccountName

Name of the New Relic account that is directly responsible for the stored events, as determined from the license key used.

masterAccountId

The ID of the master account that is either responsible for stored events or that is the parent of the consuming account. When a master account is the consuming account, masterAccountId is the consumingAccountId.

This attribute is present even for accounts that do not have a master account. This is to ensure continued reporting if the account is later made a master account.

masterAccountName

Name of the master account that is either responsible for stored events, or that is the parent of the consuming account. When a master account is the consuming account, masterAccountName is the consumingAccountName.

This attribute is present even for accounts that do not have a master account. This is to ensure continued reporting if the account is later made a master account.

partnershipId

Partner ID of the New Relic customer partnership associated with the account responsible for the stored events.

This attribute is only present if the consuming account is associated with a New Relic customer partnership.

partnershipName

Name of the New Relic customer partnership associated with the account responsible for the stored events.

This attribute is only present if the consuming account is associated with a customer partnership.

subAccountId

ID of the sub-account that is responsible for the stored event. When this attribute is present, subAccountId is the consumingAccountId.

This attribute is only present if the consuming account is a sub-account (not a master account).

subAccountName

Name of the sub-account responsible for stored events. When present, this attribute is the same as the consumingAccountName.

This attribute is only present if the consuming account is a sub-account (not a master account).

timestamp

UNIX timestamp (seconds since epoch) of the day and time when event generation was initiated.

APM attributes (host-based)

The following are usage-related attributes generated by host-based APM accounts (not CU-based APM). To query APM-specific data, use a productLine attribute value of APM.

Attribute

Description

agentHostname

ID reported by the agent to uniquely identify the host for which this usage event is reported. This value can come from several sources in the application’s environment, but commonly is the value returned by the gethostname Linux syscall. In Docker environments, this attribute can take on the value (sometimes truncated) of the Docker container ID. agentHostname is one of three possible providers for the hostId value.

apmAgentVersion

Version of the New Relic APM agent running in the application instance reporting this usage. Present only for events where usageType equals Application.

To update your agent version, see Update the New Relic agent.

apmAppId

ID uniquely identifying the application that is reporting this usage, as it appears in the APM product. Present only for events where usageType equals Application.

apmAppName

Name of the application reporting this usage, as it appears in the APM product. Present only for events where usageType equals Application.

apmHoursUsed

Number of hours for which usage was recorded for the given entity. When an entity is connected to New Relic for any amount of time within a given hour, that hour is counted toward usage.

When calculating monthly APM host usage, the calculation for equivalent hosts for a month assumes that a standard month has 750 hours: `apmHoursUsed / 750`.

apmLanguage

Name of the language that the usage-reporting application is written in, as reported by the New Relic agent. Examples: ruby, java, python. Present only for events where usageType equals Application.

bootId

Linux boot ID of host for which this usage is reported, which is unique for each boot lifetime of each Linux operating system instance. Will only be present when the New Relic agent is one of the following versions:

  • Go: 1.11 or higher

  • Java: 3.42.0 or higher

  • .NET: 6.19.330.0 or higher

  • Node.js: 2.1.0 or higher

  • PHP: 7.5.0.199 or higher

  • Python: 2.90.0.75 or higher

  • Ruby: 4.4.0.336 or higher

    bootId is one of three possible providers for the hostId value.

cloudInstanceId

ID uniquely identifying the cloud host instance (example: an AWS EC2 instance) for which this usage is reported. (For example, for an AWS EC2 instance, the value would look like i-1234abcd5678ef900.) This is used to uniquely identify the host if the apmComputeUnitRule is cloud_provider_data. This will not be present if no cloud provider was detected by the agent.

Agents with these versions will detect cloud provider data for AWS:

  • Go: 1.11 or higher

  • Java: 3.18.0 or higher

  • .NET: 5.1.72.0 or higher

  • Node.js: 1.21.0 or higher

  • PHP: 5.5.0 or higher

  • Python: 2.54.0.41 or higher

  • Ruby: 3.12.1.298 or higher

    cloudInstanceId is one of three possible providers for the hostId value.

cloudInstanceType

Instance type of the host as defined by the cloud provider and detected by the agent. For example: c4.2xlarge. This will not be present if no cloud provider was detected by the agent.

cloudProvider

Name of the cloud provider for this host. Example values: aws, azure. This will not be present if no cloud provider was detected by the agent.

cloudZone

Name of the zone that a cloud provider host is located in. For example: eu-central-1b. This will not be present if no cloud provider was detected by the agent.

containerId

ID of the Docker or other Linux container in which the application instance is running. This will not be present if a container was not detected by the agent. Present only for events where usageType equals Application. This attribute is not used to uniquely identify hosts for billing purposes.

hostId

ID used to uniquely identify the host for which this usage is reported. Any given hour of APM usage for this host will be counted only once when calculating apmHoursUsed. There are several possible host identifiers reported by the New Relic agent. The attributes, if present, will be chosen to use in this order of precedence: cloudInstanceId, bootId, agentHostname.

productLine

The New Relic product the usage data is from. Always use the value APM when querying for APM CU usage data.

usageType

For APM, this value can be either Application or Host, depending on the type of entity this event records usage for (other New Relic products will have different values for usageType). Events with both values are recorded so that usage data can be analyzed in several ways.

For Application: the event represents usage for a single unique application instance for that day. For Host: the event represents usage for a single unique host for that day.

Only Host entities are used to calculate billable usage. Application entities are useful for comparing usage between applications, but are not used for billing or contract purposes.

Query examples

Here are some examples of NRQL queries you can use with your account usage data. You can run NRQL queries and use the resulting charts in dashboards.

Use of Docker and other containers

Some previous New Relic APM agents may miscount containers as hosts, which may lead to over-reporting of host-based usage.

To fix this calculation for Linux-based containers (including Docker), upgrade your APM agent to these versions:

  • Go: 1.11 or higher
  • Java: 3.42.0 or higher
  • .NET: 6.19.330.0 or higher
  • Node.js: 2.1.0 or higher
  • PHP: 7.5.0.199 or higher
  • Python: 2.90.0.75 or higher
  • Ruby: 4.4.0.336 or higher

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.