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?
Hi Sridhar - one question before I answer more completely: what app/integration are you using to populate change failure rate?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Having to connect or set credentials, for JQL metrics in every component is also a pain.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agreed - we need to make that easier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.