Azure DevOps plugin
Monitor the Builds and Releases from your Azure DevOps environment. On this page you will find:
How to add the Azure DevOps plugin
How to add the Azure DevOps plugin
In SquaredUp browse to Settings > Plugins > Add plugin and search for the plugin.
Display Name:
Enter a name for your plugin. This helps you to identify this plugin in the list of your plugins.
Organization Name:
Enter the name of the Azure DevOps organization you want to use for this plugin.
Personal Access Token:
Enter the personal access token you created in Azure.
If you need help creating a personal access token, please refer to the Azure documentation: https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticateLeave the checkbox for Automatically create a workspace ticked, this will create a new workspace for this plugin containing out of the box dashboards and scopes.
Optionally, select whether you would like to restrict access to this plugin instance. By default, restricted access is set to off.
Restrict access to this plugin?
The term plugin here really means plugin instance. For example, a user may configure two instances of the AWS plugin, one for their development environment and one for production. In that case, each plugin instance has its own access control settings.
By default, Restrict access to this plugin? is set to off. The plugin can be viewed, edited and administered by anyone. If you would like to control who has access to this plugin, switch Restrict access to this plugin? to on.
Use the Restrict access to this plugin? dropdown to control who has access to the workspace:
By default, the user setting the permissions for the plugin will be given Full Control and the Everyone group will be given Link to workspace permissions.
Tailor access to the plugin, as required, by selecting individual users or user groups from the dropdown and giving them Link to workspace or Full Control permissions.
If the user is not available from the dropdown, you are able to invite them to the plugin by typing in their email address and then clicking Add. The new user will then receive an email inviting them to create an account on SquaredUp Cloud. Once the account has been created, they will gain access to the tenant.
At least one user or group must be given Full Control.
Admin users can edit the configuration, modify the Access Control List (ACL) and delete the plugin, regardless of the ACL chosen.
Plugin access levels
Access Level:
Link to workspace
- User can link the plugin to any workspace they have at least Editor permissions for.
- Data from the plugin can then be viewed by anyone with any access to the workspace.
User can share the plugin data with anyone they want.
User cannot configure the plugin in any way, or delete it.
Full Control - User can change the plugin configuration, ACL, and delete the plugin.
See Access control for more information.
Click Test and save to validate the plugin configuration.
Testing outcomes
Testing passed – a success message will be displayed and then the configuration will be saved.
Testing passed with warnings – warnings will be listed and potential fixes suggested. You can still use the plugin with warnings. Select Save with warnings if you believe that you can still use the plugin as required with the warnings listed. Alternatively, address the issues listed and then select Rerun tests to validate the plugin configuration again. If the validation now passes, click Save.
Testing Failed – errors will be listed and potential fixes suggested. You cannot use the plugin with errors. You are able to select Save with errors if you believe that a system outside of SquaredUp Cloud is causing the error that you need to fix. Alternatively, address the issues listed and then select Rerun tests to validate the plugin configuration again. If the validation now passes, click Save.
You can edit any plugin configurations at any time from Settings > Plugins.
Using the Azure DevOps plugin
Data streams

A data stream brings you data to answer a specific question like "What's the health state of the objects?", "What kind of alerts are coming from this plugin for my servers?", "What's the average memory usage of this app?"
The magic of data streams is that they standardize data from all the different shapes and formats your tools use into a straightforward tabular format. While creating a tile you can tweak data streams by grouping or aggregating specific columns. Depending on the kind of data, SquaredUp will automatically suggest how to visualize the result, for example as a table or line graph.
There are three types of data streams available for this plugin
Data streams installed with the plugin
Configurable data streams, see Using configurable data streams with the Azure DevOps plugin
Custom data streams created using JSON, see Using custom data streams with the Azure DevOps plugin
Every data stream can use a filter
object in the dataSourceConfig
for basic filtering. More information about the required structure of this object can be found here: GitHub: Expression. For this filter
functionality, there exists a user-defined function hasValue
, that uses the following syntax:
"hasValue": ["key", "value"]
This function should be used in cases where the value at the given key could be undefined
.
Some data streams can use scopeFilter
and stageFilter
objects for more advanced filtering. More information about these features can be found in the Using custom data streams with the Azure DevOps plugin section.
Using configurable data streams with the Azure DevOps plugin

A configurable data stream allows you to easily create new data streams specific to your needs, by entering information into a form, such as metric names or queries. Configurable data streams have a + before the name, and once new data streams have been created they show in the normal list of data streams.
Any data streams you create can be edited from Settings > Data Streams.

This data stream calls the /{{projectName}}/_apis/pipelines/{{buildId}}/runs
endpoint, and allows you to enter a custom filter.
Scope to a project, build folder or build pipeline
Select + Build Runs from the data stream list
Enter a Display Name for the new data stream
Optionally, enter a JSON Filter Expression, for example:
Copy{
"and": [
{ "hasValue": ["result", "failed"] },
{ "status": "completed" }
]
}

This data stream calls the /{{projectName}}/_odata/v4.0-preview/TaskAgentRequestSnapshots
endpoint, and allows you to enter custom query parameters and a custom filter.
Scope to a project
Select + Agent Pool Consumption from the data stream list
Enter a Display Name for the new data stream
Optionally, enter a set of OData Query Parameters, for example:
Copy{
"$apply": "filter(IsRunning eq true AND IsHosted eq true)",
"$orderby": "SamplingTime asc"
}Optionally, enter a JSON Filter Expression, for example:
Copy{
"and": [
{ "IsRunning": true },
{ "IsHosted": true }
]
}

This data stream calls the /{{projectName}}/_odata/v4.0-preview/PipelineRunActivityResults
endpoint, and allows you to enter custom query parameters and a custom filter.
Scope to a project, build folder or build pipeline
Select + Pipeline Run Activity Results from the data stream list
Enter a Display Name for the new data stream
Optionally, enter a set of OData Query Parameters, for example:
Copy{
"$apply": "filter(Pipeline/PipelineId eq {{buildId}} and ActivityCompletedDate ge {{timeframe.start}} and (ActivityType eq null or ActivityType eq 'Task'))",
"$order": "PipelineRunCompletedDateSK asc"
}Optionally, enter a JSON Filter Expression, for example:
Copy{
"and": [
{ "PipelineRunOutcome": "Failed" },
{ "TaskOutcome": "Failed" }
]
}
Using custom data streams with the Azure DevOps plugin

A custom data stream is a data stream you, as an advanced user, can write yourself. In Settings > Data Streams you can also edit any data stream created from a configurable data stream, to customize it.

Go to Settings > Data Streams.
Click Add new Data Stream.
Enter a display name for your Data Stream.
Note: The display name is the name that you use to identify your Data Stream in SquaredUp. It has no technical impact and doesn't need to be referenced in the Data Stream's code.
Choose the plugin this Data Stream is for.
After you've chosen the plugin a new field Data Source appears.
Data source and code:
To find out which data source to select and get code examples for the Code field, see the help below.
Click Save to save your Data Stream.

This data source calls the /{{projectName}}/_apis/pipelines/{{buildId}}/runs
and /{{projectName}}/_apis/build/builds/{{id}}/timeline
endpoints. It allows you to display stages as additional columns in a table of build runs.
A good starter JSON for these features is:
{
"name": "buildsWithStages",
"dataSourceConfig": {},
"rowPath": [],
"matches": {
"sourceType": { "type": "oneOf", "values": ["Azure DevOps Build Pipeline", "Azure DevOps Build Folder", "Azure DevOps Project"] }
},
"metadata": [
{ "name": "result", "displayName": "State", "shape": ["state", { "map": { "success": ["succeeded"], "warning": ["canceled"], "error": ["failed"], "unknown": ["unknown"] } }] },
{ "name": "name", "visible": false, "shape": "string", "role": "label" },
{ "name": "_links.web.href", "displayName": "Name", "shape": ["url", { "label": "{{column.name}}" }] },
{ "name": "state", "displayName": "Build Run State", "shape": "string" },
{ "name": "createdDate", "displayName": "Created On", "shape": "date" },
{ "name": "finishedDate", "displayName": "Finished On", "shape": "date" },
{ "name": "pipeline.name", "displayName": "Pipeline Name", "shape": "string" },
{ "name": "id", "displayName": "ID", "shape": "string" }
]
}

This is the normal filter logic that works with every data source. It can be added to the dataSourceConfig
object like so:
"dataSourceConfig": {
"filter": {
"and": [
{ "key1": "value1" },
{ "key2": "value2" }
]
}
}

This feature allows you to combine different stages from different release pipelines into a single column. Usually, if you, for example, scoped to two release pipelines and wanted to display one stage from each release pipeline and they each had different names, you’d have two separate columns - one for each stage. However, this would lead to one column always being empty because it doesn’t exist for a particular release run. With this feature, both stages can be displayed in the same column.
The configuration for this feature can be added to the dataSourceConfig
like so:
"dataSourceConfig": {
"stageFilter": [
{
"name": "Pre-Production",
"matchCase": false,
"contains": ["pre-prod"]
},
{
"name": "Production",
"matchCase": false,
"contains": ["prod"],
"notContains": ["pre-prod"]
}
]
}
One limitation of this logic is that you cannot combine multiple stages from the same release pipeline into a single column. The stage that appears in the column will be whichever stage comes last out of the stages that match the given criteria. For example, if you had two stages, Pre-Prod
and Prod
(in that order), and set up the criteria as "contains": ["prod"]
, it would match both stages - however, since Prod
occurs later than Pre-Prod
, then Prod
will be used.

To display stages as columns, they need to be added to the data stream’s metadata. For stages, they can be displayed two ways - you can display a string that simply displays the status of the stage, or you can display a coloured dot that changes colour depending on the status of the stage.
To display the result as a string, add the following object to the metadata
array:
{ "name": "environments.STAGE NAME.status", "displayName": "Stage Name", "shape": "string" }
To display the result as a coloured dot, add the following object to the metadata
array:
{ "name": "environments.STAGE NAME.status", "displayName": "Stage Name", "shape": ["state", { "map": { "success": ["inProgress", "scheduled", "succeeded"], "warning": ["partiallySucceeded"], "error": ["rejected"], "unknown": ["canceled", "notStarted", "queued", "undefined"] } }] }
For both of the above objects, you must replace STAGE NAME
in the name
with the (case-sensitive) name of the stage you want to display in that column. If you included a stage filter, make sure that it matches one of the stage names that you defined. The displayName
can be set to any arbitrary string.

Optional, but recommended
The metadata
parameters are used to describe columns in order to tell SquaredUp what to do with them. You can do multiple things with the metadata
parameters:
Specify how SquaredUp should interpret the columns you return and - to an extent - how their content displayed. You do this by giving each column a shape.
The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link.
Filter out or just hide columns.
Only the columns you define in
metadata
will be returned in the results. This helps you to filter out columns you don't need. If you need the content of a column but don't want to display it, you can use thevisible
parameter.Give columns a nicely readable display name.
Assign a specific role to columns
The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role
value
to the column that contains the actual value you want to use in your visualization.
Note: If you don't specify any metadata, all columns will be returned and SquaredUp will do its best to determine which columns should be used for which purpose. If you're returning pretty simple data, for example just a string and a number, this can work fine. But if you're returning two columns with numbers it gets trickier for SquaredUp to figure out which one is the value and which one is just an ID or some other number.
Parameters:
Tip: Before you start specifying metadata, leave them empty at first and get all the raw data with your new data stream once. In order to do this, finish creating your custom data stream without metadata and create a tile with this data stream. The Table visualization will show you all raw data.
This will give you an overview about all columns and their content and help you decide which columns you need and what their shapes and roles should be. It's also essential for getting the correct column name to reference in the name
parameter.
Use this information to go back to the data stream configuration and specifying the metadata.
name | Mandatory | Enter the name of the column you are referencing here. To find the name of a column, get the data from this data stream once without any metadata. See the tip above for how to do that. You'll see the column name when you hover over the column in the Table. |
displayName | Optional | Here you can give the column a user-friendly name for the UI |
shape | Recommended | The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link. Note: Please refer to the list of shapes below this table to see available shapes. |
role | Recommended | The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role Note: Please refer to the list of roles below this table to see available roles. |
visible | Optional |
Use this if you need a columns content but don't need to display the column itself. Example: Column A contains the full link to a ticket in your ticket system. Column B contains the ticket ID. You want to use the ticket ID as a label for the link, turning the long URL into a much nicer to read "Ticket 123". This is why you need the content of column B, to assign it as a label for column A. But since the URL is now displayed as the ticket ID, it would be redundant to still display column B. This is why you hide column B with |

There are many different shapes you can use for your columns and the list of possible shapes gets expanded constantly:
Basic types, like:
boolean
,date
,number
,string
Currency types that get displayed with two decimal values and their currency symbol (for example $23,45), like:
currency
(generic currency),eur
,gbp
,usd
Data types, like:
bytes
,kilobytes
,megabytes
Time types, like:
seconds
,milliseconds
,timespan
The status type :
state
Utility types, like:
customUnit
url
(will be displayed as a link)
Tip:
Some shapes can be configured.
If a shape is configurable, you can edit how the shape displays data in the UI.

label | A column containing user-friendly names. Line Graphs use this role to group data into series. so each label will get its own line in the Line Graph. |
link | A column containing a link that can be used as a drilldown in Status Blocks. |
timestamp | A column containing a date to use on the X -axis of a Line Graph. |
unitLabel | A column containing user-friendly labels for data series, e.g. ‘Duration’. Line Graphs can use this role to label the Y-axis. |
value | A column containing the numeric value you want to use in your visualization. |

This data source calls the /{{projectName}}/_apis/release/releases
endpoint. It allows you to display stages as additional columns in a table of release runs.
A good starter JSON for these features is:
{
"name": "releasesWithStages",
"dataSourceConfig": {},
"rowPath": [],
"matches": {
"sourceType": { "type": "oneOf", "values": ["Azure DevOps Release Pipeline", "Azure DevOps Release Folder", "Azure DevOps Project"] }
},
"metadata": [
{ "name": "name", "visible": false, "shape": "string", "role": "label" },
{ "name": "_links.web.href", "displayName": "Name", "shape": ["url", { "label": "{{column.name}}" }] },
{ "name": "description", "displayName": "Description", "shape": "string" },
{ "name": "releaseDefinition.name", "displayName": "Release Pipeline Name", "shape": "string" },
{ "name": "releaseDefinition.path", "displayName": "Release Pipeline Path", "shape": "string" },
{ "name": "reason", "displayName": "Reason", "shape": "string" },
{ "name": "createdOn", "displayName": "Created On", "shape": "date" },
{ "name": "createdBy.displayName", "displayName": "Created By", "shape": "string" },
{ "name": "createdBy.uniqueName", "displayName": "Created By (Unique Name)", "shape": "string" },
{ "name": "modifiedOn", "displayName": "Modified On", "shape": "date" },
{ "name": "createdFor.displayName", "displayName": "Created For", "shape": "string" },
{ "name": "craetedFor.uniqueName", "displayName": "Created For (Unique Name)", "shape": "string" },
{ "name": "id", "displayName": "ID", "shape": "string" }
]
}

This is the normal filter logic that works with every data source. It can be added to the dataSourceConfig
object like so:
"dataSourceConfig": {
"filter": {
"and": [
{ "key1": "value1" },
{ "key2": "value2" }
]
}
}

This feature allows you to filter to only release runs where a stage associated with a given service ID has been run. It can be added to the dataSourceConfig
object like so:
"dataSourceConfig": {
"scopeFilter": {
"kubernetesServiceEndpoint": {
"equals": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
}
}

This feature allows you to combine different stages from different release pipelines into a single column. Usually, if you, for example, scoped to two release pipelines and wanted to display one stage from each release pipeline and they each had different names, you’d have two separate columns - one for each stage. However, this would lead to one column always being empty because it doesn’t exist for a particular release run. With this feature, both stages can be displayed in the same column.
The configuration for this feature can be added to the dataSourceConfig
like so:
"dataSourceConfig": {
"stageFilter": [
{
"name": "Pre-Production",
"matchCase": false,
"contains": ["pre-prod"]
},
{
"name": "Production",
"matchCase": false,
"contains": ["prod"],
"notContains": ["pre-prod"]
}
]
}
One limitation of this logic is that you cannot combine multiple stages from the same release pipeline into a single column. The stage that appears in the column will be whichever stage comes last out of the stages that match the given criteria. For example, if you had two stages, Pre-Prod
and Prod
(in that order), and set up the criteria as "contains": ["prod"]
, it would match both stages - however, since Prod
occurs later than Pre-Prod
, then Prod
will be used.

To display stages as columns, they need to be added to the data stream’s metadata. For stages, they can be displayed two ways - you can display a string that simply displays the status of the stage, or you can display a coloured dot that changes colour depending on the status of the stage.
To display the result as a string, add the following object to the metadata
array:
{ "name": "environments.STAGE NAME.status", "displayName": "Stage Name", "shape": "string" }
To display the result as a coloured dot, add the following object to the metadata
array:
{ "name": "environments.STAGE NAME.status", "displayName": "Stage Name", "shape": ["state", { "map": { "success": ["inProgress", "scheduled", "succeeded"], "warning": ["partiallySucceeded"], "error": ["rejected"], "unknown": ["canceled", "notStarted", "queued", "undefined"] } }] }
For both of the above objects, you must replace STAGE NAME
in the name
with the (case-sensitive) name of the stage you want to display in that column. If you included a stage filter, make sure that it matches one of the stage names that you defined. The displayName
can be set to any arbitrary string.

Optional, but recommended
The metadata
parameters are used to describe columns in order to tell SquaredUp what to do with them. You can do multiple things with the metadata
parameters:
Specify how SquaredUp should interpret the columns you return and - to an extent - how their content displayed. You do this by giving each column a shape.
The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link.
Filter out or just hide columns.
Only the columns you define in
metadata
will be returned in the results. This helps you to filter out columns you don't need. If you need the content of a column but don't want to display it, you can use thevisible
parameter.Give columns a nicely readable display name.
Assign a specific role to columns
The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role
value
to the column that contains the actual value you want to use in your visualization.
Note: If you don't specify any metadata, all columns will be returned and SquaredUp will do its best to determine which columns should be used for which purpose. If you're returning pretty simple data, for example just a string and a number, this can work fine. But if you're returning two columns with numbers it gets trickier for SquaredUp to figure out which one is the value and which one is just an ID or some other number.
Parameters:
Tip: Before you start specifying metadata, leave them empty at first and get all the raw data with your new data stream once. In order to do this, finish creating your custom data stream without metadata and create a tile with this data stream. The Table visualization will show you all raw data.
This will give you an overview about all columns and their content and help you decide which columns you need and what their shapes and roles should be. It's also essential for getting the correct column name to reference in the name
parameter.
Use this information to go back to the data stream configuration and specifying the metadata.
name | Mandatory | Enter the name of the column you are referencing here. To find the name of a column, get the data from this data stream once without any metadata. See the tip above for how to do that. You'll see the column name when you hover over the column in the Table. |
displayName | Optional | Here you can give the column a user-friendly name for the UI |
shape | Recommended | The shape you assign to a column tells SquaredUp what the column contains (for example, a number, a date, a currency, a URL, etc.). Based on the shape SquaredUp decides how to display this column, for example to display a URL as a clickable link. Note: Please refer to the list of shapes below this table to see available shapes. |
role | Recommended | The role you assign to a column tells SquaredUp the purpose of the column. For example, if you have two different columns that contain numbers, you need to assign the role Note: Please refer to the list of roles below this table to see available roles. |
visible | Optional |
Use this if you need a columns content but don't need to display the column itself. Example: Column A contains the full link to a ticket in your ticket system. Column B contains the ticket ID. You want to use the ticket ID as a label for the link, turning the long URL into a much nicer to read "Ticket 123". This is why you need the content of column B, to assign it as a label for column A. But since the URL is now displayed as the ticket ID, it would be redundant to still display column B. This is why you hide column B with |

There are many different shapes you can use for your columns and the list of possible shapes gets expanded constantly:
Basic types, like:
boolean
,date
,number
,string
Currency types that get displayed with two decimal values and their currency symbol (for example $23,45), like:
currency
(generic currency),eur
,gbp
,usd
Data types, like:
bytes
,kilobytes
,megabytes
Time types, like:
seconds
,milliseconds
,timespan
The status type :
state
Utility types, like:
customUnit
url
(will be displayed as a link)
Tip:
Some shapes can be configured.
If a shape is configurable, you can edit how the shape displays data in the UI.

label | A column containing user-friendly names. Line Graphs use this role to group data into series. so each label will get its own line in the Line Graph. |
link | A column containing a link that can be used as a drilldown in Status Blocks. |
timestamp | A column containing a date to use on the X -axis of a Line Graph. |
unitLabel | A column containing user-friendly labels for data series, e.g. ‘Duration’. Line Graphs can use this role to label the Y-axis. |
value | A column containing the numeric value you want to use in your visualization. |

Both the scope and stage filters support a set of different criteria for matching different values. Criteria options are:
Criteria | Type | Description | Default | Example |
matchCase | Boolean | Whether to match case-sensitively or not |
| "matchCase": false |
| Array of strings | Strings that the value should contain | [] | "contains": ["dev", "prod"]
|
notContains | Array of strings | Strings that the value should not contain | [] | "notContains": ["deploy", "pre-prod"]
|
equals | Array of strings | Strings that the value should equal | [] | "equals": ["development", "production"]
|
startsWith | Array of strings | Strings that the value should start with | [] | "startsWith": ["dev", "prod"]
|
endsWith | Array of strings | Strings that the value should end with | [] | "endsWith": ["vm", "testing"]
|
regex | Array of objects | Regular expressions that the value should match | [] | "regex": [{ "pattern": "", "flags": "g" }, { "pattern": "", "flags": "i" }]
|

All of the features that are used by adding objects to the dataSourceConfig
in a custom data stream can also be added to a tile itself. To do this, open the tile editor and switch to the Code tab. You can then add a custom dataSourceConfig
object to the dataStream
object in the editor. For example:
"dataStream": {
"id": "datastream-XXXXXXXXXXXXXXXXXXXX",
"dataSourceConfig": {
"scopeFilter": {
"kubernetesServiceEndpoint": {
"equals": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
},
"stageFilter": [{
"name": "My Stage",
"matchCase": false
"contains": ["prod"],
"notContains": ["pre-prod"]
}],
"filter": {
"and": [
{ "key1": "value1" },
{ "key2": "value2" }
]
}
}
}
One limitation of this approach is that if you’re using a custom data stream, the existing dataSourceConfig
gets entirely overwritten by the one on the tile, so, for example, if you have a stage filter in the custom data stream and a filter on the tile, only the filter will have any effect.
Comments
0 comments
Please sign in to leave a comment.