Dynamic Focus queries
Dynamic Focus queries provide powerful filtering capabilities that identify the specific entities, metrics, and events within your monitored environment and help you to focus on the data that matters most.
- Key concepts
- Dynamic Focus queries: Instana's first-generation query language
- How Dynamic Focus queries work
- Why use Dynamic Focus queries?
- Applying Dynamic Focus queries in different contexts
- Using Dynamic Focus in the Instana UI
Key concepts
Dynamic Focus queries use advanced capabilities to deliver precise and efficient filtering.
Dynamic Graph
Instana's Dynamic Graph is a comprehensive model that includes all the physical and logical components of your environment, along with historical attributes, metrics, distributed traces, and events. These elements are interconnected in a graph, based on their dependencies. With Dynamic Focus queries, you can create filters on the graph so that you can define custom views on your data and focus on exactly the information you need. For more information about Dynamic Graphs, see Using the Dynamic Graph.
Automatic discovery
Instana's agents automatically discover all components and their dependencies in real-time, adding them to the Dynamic Graph. All saved Dynamic Focus queries automatically update, if impacted, without requiring any manual updates or configuration.
Lucene-based query language
Dynamic Focus queries are built on Lucene, a powerful and flexible text search engine library. Lucene enables Dynamic Focus queries to efficiently search and filter large volumes of data by indexing the attributes, metrics, and other elements within the Dynamic Graph. By using Dynamic Focus Queries, you can perform complex and precise "cross-context" searches across the entire dataset, retrieving the most relevant information quickly. Lucene's capabilities also support full-text search, making it easier to find specific data points or patterns within your monitored environment. For more information about how to use Lucene's query language, see Lucene Query Syntax documentation.
Dynamic Focus queries: Instana's first-generation query language
Dynamic Focus queries were the first-generation query language that is introduced in Instana. When you use Dynamic Focus queries, you can perform detailed and customizable searches across different contexts within the Dynamic Graph. Although newer query methods are available, Dynamic Focus queries remain a powerful tool for users who need to create specific, text-based queries that span multiple data stores.
Query syntax
Dynamic Focus queries use Lucene's query syntax, which provides a flexible and powerful way to construct search queries. The following components provide an overview of how it works:
-
Basic syntax: Lucene queries are composed of terms and operators, where terms can be a single word (for example, "error") or a phrase (for example,
"memory leak"
). Operators such as AND, OR, and NOT can be used to combine terms, control their relationship, and refine the query. -
Field-specific queries: You can restrict a search to a specific field by prefixing the term with the field name (for example,
status:500
). Field-specific queries can focus on particular attributes within the data. -
Wildcards: Lucene supports the use of wildcards for partial matching. For instance,
mem*
matches with "memory" and "memcache."
Default operator
The default operator in Lucene determines how terms are combined when no explicit operator is provided. In Instana's Dynamic Focus queries, the default operator is typically AND. This means that if you enter multiple terms without specifying an operator, the query returns results that match all of those terms.
For example, the query error timeout
is interpreted as error AND timeout
, returning only those results that contain both "error" and "timeout."
Complex subqueries
With Dynamic Focus queries you can create complex subqueries that use parentheses to group terms and operators. This feature provides greater control over how queries are structured and how results are filtered.
For example, (error OR timeout) AND status:500
returns results that contain either "error" or "timeout," but only if the status is 500.
These complex subqueries build detailed and precise filters that are tailored to your specific needs.
Known limitations
While DFQs are powerful, the following known limitations exist:
- Performance: Complex queries with multiple terms and operators can impact performance, especially in large environments with extensive data.
- Field-specific Limitations: Not all fields might be available for filtering depending on how the data is indexed and stored in the Dynamic Graph.
- Lack of Full-text Search in Some Contexts: In certain contexts, full-text search capabilities might be limited or unavailable, which can restrict the types of queries that can be performed.
Despite these limitations, Dynamic Focus queries remain an essential tool for users who need advanced filtering and search capabilities within Instana.
How Dynamic Focus queries work
-
Scoping: Define the scope of your analysis by selecting infrastructure components, applications, services, or specific transactions. Scoping narrows down the data, making your analysis more efficient.
-
Filtering: Apply filters based on tags, metrics, or attributes. You can combine filters to create detailed queries that extract the precise data you need.
-
Real-time Analysis: Instana provides real-time insights based on your selected scope and filters, so that you can quickly identify and resolve issues, optimize performance, and make informed decisions.
Why use Dynamic Focus queries?
Dynamic Focus queries are especially useful in large environments where data can be overwhelming. By using filters, you can:
- Reduce Noise: Focus on the relevant data, ignoring the rest.
- Increase Efficiency: Quickly find and analyze the information that you need.
- Improve Accuracy: Base your decisions on the most relevant and precise data available.
Applying Dynamic Focus queries in different contexts
You can use Dynamic Focus queries in the following contexts:
- Infrastructure Monitoring: Filter by host, container, or specific infrastructure components to gain insights into performance and health.
- Application Perspectives: Monitor specific services or applications, tracking key performance indicators (KPIs) and detecting anomalies.
- Event Filtering: Isolate and analyze specific events that impact your environment, such as errors, latency issues, or resource constraints.
Dynamic Focus queries are both powerful and flexible, giving you the tools that you need to manage and optimize your systems effectively.
Using Dynamic Focus in the Instana UI
Using Dynamic Focus techniques to filter the data is also supported in the Instana UI. For more information, see Filtering with Dynamic Focus.