• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Domain management

Domain management methods

Method

Description

nrAddDomainSubstitution

Add a matching pattern for the domain attribute and substitute it by another string. Every time an event or metric is generated with a domain attribute, tha agent will check if it matches a regex and will apply the specified substitution. If no pattern is set, it will use the URL domain unchanged. It applies to all events and metrics containing the "domain" attribute.

nrDelDomainSubstitution

Delete a matching pattern created with nrAddDomainSubstitution.

Examples

nrAddDomainSubstitution

nrAddDomainSubstitution(nr, "^.+\.my\.domain\.com$", "mydomain.com")

nrDelDomainSubstitution

nrDelDomainSubstitution(nr, "^.+\.my\.domain\.com$")
Copyright © 2026 New Relic Inc.

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