[role="xpack"]
[[filters]]
=== Filters
++++
Filter data
++++
Global filters are ways you can filter data across the APM app based on a specific
time range or environment. They are available in the Services, Transactions, Errors,
Metrics, and Traces views, and any filter applied will persist as you move between pages.
[role="screenshot"]
image::apm/images/global-filters.png[Global filters available in the APM app in Kibana]
[NOTE]
=====
If you prefer to use advanced queries on your data to filter on specific pieces
of information, see <>.
=====
[[global-time-range]]
==== Global time range
The <> in {kib} restricts APM data to a specific time period.
[[environment-selector]]
==== Service environment filter
The environment selector is a global filter for `service.environment`.
It allows you to view only relevant data and is especially useful for separating development from production environments.
By default, all environments are displayed. If there are no environment options, you'll see "not defined".
Service environments are defined when configuring your APM agents.
It's vital to be consistent when naming environments in your agents.
To learn how to configure service environments, see the specific agent documentation:
* *Go:* {apm-go-ref}/configuration.html#config-environment[`ELASTIC_APM_ENVIRONMENT`]
* *Java:* {apm-java-ref}/config-core.html#config-environment[`environment`]
* *.NET:* {apm-dotnet-ref}/config-core.html#config-environment[`Environment`]
* *Node.js:* {apm-node-ref}/configuration.html#environment[`environment`]
* *PHP:* {apm-php-ref}/configuration-reference.html#config-environment[`environment`]
* *Python:* {apm-py-ref}/configuration.html#config-environment[`environment`]
* *Ruby:* {apm-ruby-ref}/configuration.html#config-environment[`environment`]
* *Real User Monitoring:* {apm-rum-ref}/configuration.html#environment[`environment`]