Defining value stream metrics
Add metric data to your value streams by using the DevOps language query language.
You can add performance metrics to your value streams by applying charts to data integrated into
HCL™ Accelerate. The data can originate from plugin integrations, or REST API calls from external clients.
DevOps Query Language (DQL) queries are defined in the value_stream_name-vsm.json
file attached to a value stream, or in the search bar on the Value Streams
page. You can add graphs or charts derived from the data to the Metric bar,
or the list view on the Value Streams page.
To add metric data to a Value Streams page, complete the following steps:
- On the Value Streams page, click
and select Download value stream map.
- Using a text editor, add
metrics
definition to thevalue_stream_name-vsm.json
file. The properties are defined later in this topic. - Upload the file to your value stream.
Metric data properties are described in the following table:
Property | Description |
---|---|
name | Query name. |
repeatEvery | Defines how frequently the query runs. |
repeatAt | Time option. Note, currently not used. |
metricDefinitionID | The metric definition that is used to collect the data. |
properties | Defines the query that is applied to the collected data. The property field can consist of a
simple DQL field statement or an array of objects. When defined as a single field statement, such as
issue.tags , or issue.severity , the query groups and then counts
the distinct values for the field. When defined as an array of objects, a single name can be
assigned to the entire DQL query. |
The default value stream provides a metric definition. You can use the
Work Item Type
metric as a template for your metrics. Typically, the Work
Item Type
metric is used to hold the work item or issue type for from an issue tracking
tool, such as Jira. Typical issue types include story, bug, task, and APAR.
"metrics": [
{
"name": "Work Item Type",
"repeatEvery": "1 minute",
"repeatAt": null,
"metricDefinitionId": "WORK_ITEM_TYPE",
"properties": {
"query": null,
"field": "issue.type"
}
}
],
Examples
In the following example, all work items that do not have a status of "Closed" are grouped by type, and then a count for each group is provided to the metrics collection.
"metrics": [
{
"name": "Work Item Distribution",
"repeatEvery": "24 hours",
"repeatAt": null,
"metricDefinitionId": "WORK_ITEM_TYPE_COUNT",
"properties": {
"query": "issue.status != Closed",
"field": "issue.type"
}
}
]
In this example, the number of items that match each query in the array is saved to the metric collection.
"metrics": [
{
"name": "Work Item Owners",
"repeatEvery": "24 hours",
"repeatAt": null,
"metricDefinitionId": "WORK_ITEM_OWNER",
"properties": {
"query": null,
"field":[
{
"name": "My items",
"query": "issue.owner = Some Name"
},
{
"name": "Your Items",
"query": "issue.owner = Amother Name"
}
]
}
}
]