In a previous guide, we walked through the steps needed to set up custom namespaces in your application. You can use these namespaces to group parts of an application together, but you can also use them to ignore these namespaces entirely. This could be a good alternative to ignoring many individual actions.
Ignoring namespaces will ignore error and performance data from all
actions in namespaces. AppSignal will still report custom metrics
data recorded in any of the namespace actions.
Ignoring namespaces
Namespaces can be ignored by customizing your application’s AppSignal integration configuration. The “ignore namespaces” configuration option will allow you to configure a denylist of namespaces. Any namespaces in this list will be ignored, meaning the data from these actions will not be sent to the AppSignal servers and will not count towards your organization’s billing plan.
The “ignore namespaces” config option is configured differently per integration language. See the list of integrations below for the one your app uses:
If you’re unsure what namespaces you need to configure in your application’s
AppSignal configuration, you can use the namespaces filtering dropdown on
AppSignal.com and copy those namespaces into your AppSignal configuration.
Ruby
To ignore namespaces in Ruby, add the following to your AppSignal configuration file. The ignore_namespaces value is an Array of Strings.
Appsignal.configure do |config|
config.ignore_namespaces += [
"http_request", # "web" namespace on AppSignal
"background_job", # "background" namespace on AppSignal
"admin",
"private"
]
end
For more information about this config option, see the ignore_namespaces config option documentation.
Elixir
To ignore namespaces in Elixir, add the following to your AppSignal configuration file. The ignore_namespaces value is a List of Strings.
import Config
config :appsignal, :config,
ignore_namespaces: [
"http_request", # "web" namespace on AppSignal
"background_job", # "background" namespace on AppSignal
"admin",
"private"
]
For more information about this config option, see the ignore_namespaces config option documentation.
Node.js
To ignore namespaces in Node.js, add the following to your AppSignal configuration file. The ignoreNamespaces value is an Array of Strings.
const { Appsignal } = require("@appsignal/nodejs");
new Appsignal({
// Other config
ignoreNamespaces: ["web", "background", "admin", "private"],
});
For more information about this config option, see the ignoreNamespaces config option documentation.
Python
To ignore namespaces in Python, add the following to your AppSignal configuration file. The ignore_namespaces value is a list of strings.
from appsignal import Appsignal
appsignal = Appsignal(
# Other config
ignore_namespaces=["web", "background", "admin", "private"]
)
For more information about this config option, see the ignore_namespaces config option documentation.
To ignore namespaces in Go applications, add the following to your AppSignal configuration file. The ignore_namespaces value is a slice of strings.
res := resource.NewWithAttributes(
attribute.StringSlice("appsignal.config.ignore_namespaces", []string{"admin", "secret"}),
// And other resource attributes
)
For more information about this config option, configure the ignore_namespaces config option.
Java
To ignore namespaces in Java applications, configure the ignore_namespaces config option using the OTEL_RESOURCE_ATTRIBUTES environment variable.
function encode() {
echo -n "$@" | sed 's/,/%2C/g'
}
export OTEL_RESOURCE_ATTRIBUTES="\
appsignal.config.ignore_namespaces=$(encode "admin,secret"),\
..."
For more information about this config option, see the ignore_namespaces config option documentation.
PHP
To ignore namespaces in PHP applications, configure the ignore_namespaces config option.
return [
'ignore_namespaces' => ['admin', 'secret'],
// ... other options
];
For more information about this config option, see the ignore_namespaces config option documentation.