Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

change failure rate

Sridhar Ravula May 29, 2025

one quick question on metrics related,

I'm looking for guidance on how to programmatically enable or configure the "Change Failure Rate" (CFR) metric for a component in Atlassian Compass.

When I integrate my CI/CD tools, I observe that metrics like "Build success rate," "Build time," and "Deployment frequency" often appear automatically for components, and their metric_source_id can be retrieved.

However, for Change Failure Rate, I currently need to go into each component in the Compass UI, click "Connect metrics," and then go through the steps to generate the CFR metric (which typically involves connecting incident management tools and defining failure criteria). Only after this manual UI configuration is complete does the CFR metric appear and its metric_source_id become available.

My goal is to automate this "enabling" or "configuration" step for CFR via API so that I can programmatically ensure CFR is active for all relevant components and subsequently retrieve its

Is there a specific Compass API endpoint (REST or GraphQL) that allows for the programmatic enablement or configuration of the Change Failure Rate metric for a component?

 

2 answers

0 votes
Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 30, 2025

Hi Sridhar - one question before I answer more completely: what app/integration are you using to populate change failure rate?

Sridhar Ravula May 30, 2025

we integrated with GitHub actions , so all the metrics populated in compass component. but CFR we have written workflow in github actions that will calculate and update in compass  . so now by default CFR metric panel will not be there when we create compass, so i need to connect metrics and select CFR, then in our CFR workflow we are getting the metric source id based on component id 

Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 30, 2025

Ah, got it, thanks. That's awesome!

Yes, if you are populating values via the API, you can use the `createMetricSource` GraphQL mutation to create a metric source: https://developer.atlassian.com/cloud/compass/graphql/#mutations_createMetricSource

However, there are two ways you can supply metrics via the REST API. One uses metric sources (as you've found), and the other one lets you supply the metric definition ID and the component ID. See https://developer.atlassian.com/cloud/compass/rest/v2/api-group-metrics/#api-compass-v1-metrics-post 

 

Screenshot 2025-05-30 at 2.37.01 PM.png

0 votes
Keith Furnell
Contributor
May 29, 2025

Having to connect or set credentials, for JQL metrics in every component is also a pain.

Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 30, 2025

Agreed - we need to make that easier.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events