Tags are key-value pairs, for example
team: operations, added to entities, 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 entities. 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.
Tags are automatically applied to entities in some cases, from the following sources:
- Account metadata
- New Relic agent configuration
- New Relic agent environment
- OpenTelemetry resource attributes
Tags from these sources can be removed or changed only by modifying the source of the tag, not via the UI or API.
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.
Go to one.newrelic.com and select a monitored entity, like a monitored app or host.
Near the entity's name at the top of the page, select the See metadata and manage tags menu.
In the Add a new tag... field of the pop-up menu, add a tag with this format:
For APM agents, if you want to use those tags in NRQL queries, restart your service.
- Go to one.newrelic.com and select a monitored entity, like a monitored app or host.
- Near the entity's name at the top of the page, select the See metadata and manage tags menu.
- In the menu that pops up, click the Remove tags toggle.
- Click the next to the tag you want to remove.
- 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 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:
- Go to one.newrelic.com.
- 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
Follow these best practices to get the most out of your tags.
Here are some examples of common ways to use tags to organize data.
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.js v4.13.0 or higher
- PHP v10.0.0.312 or higher
- Python v18.104.22.168 or higher
- Ruby v22.214.171.1242 or higher