• Log in

Use tags to help organize and find your data

Tags are key-value pairs, for example team: operations, added to various sets of data, like monitored apps and hosts, agents, dashboards, and workloads. We make some important attributes available as tags such as app metadata like app name and language, and host metadata like host name and AWS region. You can also add your own custom tags.

You can use tags in the UI to filter down to relevant data. Here is an example:

Here you can see an accountId tag being used to filter workloads to a specific account.

Tags help you:

  • Organize data coming from a large number of sources and/or to a large number of New Relic accounts.
  • Identify teams, roles, environments, or regions to know who's responsible for what. See some examples.
  • Better organize and search dashboards and workloads.
  • Query and chart APM data.

Tags are useful for organizing data at a high level. If you want to add more fine-grained detail, like capturing user names or other high-cardinality values, custom attributes or custom events are a better solution.

Manage tags

Some important attributes are available by default to be used as tags. For example, the account name, the account ID, and some basic host and server metadata. You can't remove these available-by-default tags.

When you add tags via the UI or API, this occurs at the entity level. This means that, for example, if you have multiple APM agents monitoring a single entity and apply a tag via the UI, that tag is available for all data coming from that entity.

Add tags

  1. Go to one.newrelic.com and select a monitored entity, like a monitored app or host.

  2. Near the entity's name at the top of the page, select the See metadata and manage tags menu.

  3. In the Add a new tag... field of the pop-up menu, add a tag with this format: accountId: 123456789.

  4. For APM agents, if you want to use those tags in NRQL queries, restart your service.

Remove tags

  1. Go to one.newrelic.com and select a monitored entity, like a monitored app or host.
  2. Near the entity's name at the top of the page, select the See metadata and manage tags menu.
  3. In the menu that pops up, click the Remove tags toggle.
  4. Click the next to the tag you want to remove.
  5. For APM agents, if you want to use those tags in NRQL queries, restart your service.

Check out this short video on querying APM tags (3:20 minutes).

Use tags to filter your entities

Use the filter field at the top of the New Relic Explorer to filter down to the entities you care about. You can use multiple filter conditions.

You can filter by single or multiple elements and use advanced search options.

To filter down to certain entities using tags:

  1. Go to one.newrelic.com.
  2. Click the Filter by ... field to see a dropdown of available attributes and tags or enter a tag you want to filter by, such as accountId: 123456789.

Best practices

Follow these best practices to get the most out of your tags.

Tag examples

Here are some examples of common ways to use tags to organize data.

Custom queries, dashboards, and alerts

Different features handle tags differently. Here are some details about how you can use NRQL to query tag data, or create NRQL condition alerts.

Learn about how to use tags with dashboards and how to use tags with workloads.

Query and alert on APM tags

You can query APM tags using NRQL. These are the supported APM agents:

  • Go v2.3.0 or higher
  • Java v4.9.0 or higher
  • .NET v8.17 or higher
  • Node v4.13.0 or higher
  • PHP v10.0.0.312 or higher
  • Python v4.10.0.112 or higher
  • Ruby v6.1.0.352 or higher

Query examples

Query and alert on attributes

Some important attributes are used as tags. You can query all attributes and create custom charts using NRQL, and create NRQL alert conditions.

Copyright © 2022 New Relic Inc.

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