The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to handle predefined metrics with multiple repositories

Garyl Paras
Contributor
May 8, 2023

For components that have multiple repositories. I did not find a way how to control which repo the predefined metrics will going to use.

compass-repos.PNG


Also, is there a way to disconnect these predefined metrics?
We opt-in to make our own custom metrics and these predefined metrics will appear to be duplicates. The reason we are creating our own metrics is to have control over the calculation in the source repo.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Patrick Hill
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2023

Hey Garyl, thanks for raising this!


Our model for Compass at the moment relies on at most one metric source per component. In this case, it will be the repository that you first added to this component.

 

At the moment you can’t disabled predefined metrics from Forge apps, however as a workaround you can delete them from a component via the API and re-create them yourself. The steps to follow there would be:

  1. Use https://github.com/atlassian-labs/compass-examples/tree/main/snippets/graphql/get-metric-values-for-component to retrieve the metric sources for the component in question
  2.  Delete the metric source using https://github.com/atlassian-labs/compass-examples/tree/main/snippets/graphql/delete-metric-source
  3. Recreate it using https://github.com/atlassian-labs/compass-examples/tree/main/snippets/graphql/create-metric-source


Looking at your attached screenshot - why not have a Cloud Resource component each for the network infrastructure and the app infrastructure? This way you could see when each piece changed independently in the activity feed!


We’re thinking about some improvements to this and want to hear about your use cases for multiple metric sources for one Component - for example were you looking to aggregate across multiple sources, choose only one or had something else in mind?

Patrick

Garyl Paras
Contributor
May 10, 2023

Thanks for the response @Patrick Hill . I'm going to try it and let you know the result. I hope that in future releases, there will be an easy way to disconnect predefined metrics in the UI, just like with custom metrics.
The network and app infrastructure repositories are the resources that the component is using or hosted on. Putting it as a separate component will triple our catalog list. That is probably the only downside.

Like Steffen Opel _Utoolity_ likes this
Garyl Paras
Contributor
May 11, 2023

Disconnecting predefined metrics through API works as a workaround. Thanks!

Like # people like this
TAGS
AUG Leaders

Atlassian Community Events