Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to handle predefined metrics with multiple repositories

Garyl Paras 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

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 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 May 11, 2023

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

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events