What are component metrics?
In Compass, a metric is a quantifiable measure of behavior observed and collected from your systems, tools, and processes. Metrics provide data points that help you track and assess the performance of your processes, products, and teams.
We often measure the behavior of services we run in production using metrics like request rate and latency. During incidents, we measure the time to recovery so we can work towards shortening the duration of outages for our customers. Metrics such as these help you track both technical capabilities and team processes to identify and remove any bottlenecks early on in your development and operational lifecycle.
Throughout the software development lifecycle, teams rely on various tools and processes that generate several metrics. Compass provides several predefined metrics and enables you to create a custom metric valuable to you and your team. You can connect those metrics to your components and push values from different tools to create a richer and centralized view for your components and teams.
In addition, Compass can derive metric values for certain predefined metrics based on events received from your components.
JQL Metrics
A Compass metric can be designated as a special type of metric called a JQL metric. JQL metrics allow you to create custom metrics based on Jira Query Language (JQL) queries. This feature enables you to track Jira issue counts and other criteria specific to your components, providing a more granular view of your component's performance and health.
With JQL metrics, you can define a metric using a JQL query that is scoped to your component. This allows you to monitor various aspects such as open bugs, issues breaching SLA, or any other criteria you define. The JQL query ensures that the data is relevant and specific to your component, enhancing your ability to track and analyze issue trends effectively.
Query filters
There are two filtering options available for JQL metrics: component filtering and project filtering. These filters prepend an extra condition in order to filter the issue count for that specific component.
Component filtering
Component filtering allows you to narrow down the issue count to a specific component by automatically prepending a condition to the JQL query. For example, if your query is issuetype = Bug AND statusCategory != Done
and you attach it to a component named "magnetic-api," the query becomes (component = "magnetic-api") AND (issuetype = Bug AND statusCategory != Done)
. This ensures that only issues associated with the specified component are counted.
Project filtering
On the other hand, project filtering can be used when a component is linked to a Jira project. If your query is the same as above and the component is linked to a project with the key "ACME," (via the Projects component field) the query becomes (project in (ACME)) AND (issuetype = Bug AND statusCategory != Done)
. This filters the issues to those within the specified project without requiring individual issues to be linked to components.
If either filter is undesirable, you can edit the query on a per-component basis to suit your needs.
Was this helpful?