mulesoft-catalyst / metrics-toolkit

The metrics toolkit (formerly metrics accelerator/framework) is a Mule application intended to collect, aggregate and load platform metrics into different visualization systems; providing out of the box integrations and visualization options, including useful dashboards and charts.
The Unlicense
83 stars 106 forks source link

API Instance count is not correct #152

Closed saurabhgoyalgithub closed 2 years ago

saurabhgoyalgithub commented 2 years ago

Total API instance count for an environment is different from the actual count. This also differs from the API instance count returned from AnyPoint Platform APIs.

richardmckinley commented 2 years ago

Hi @saurabhgoyalgithub Can you please elaborate on where you are seeing these discrepancies? Is it in a particular dashboard etc.? Screenshots of your platform API response compared to the metrics-toolkit output would be helpful as well. Thanks and regards, Richard

saurabhgoyalgithub commented 2 years ago

Hi @richardmckinley ,

Our CSM Aaron has shared required information to you separately. Please let me know if further details are needed. Appreciate your prompt attention to this!

Thanks, Saurabh

richardmckinley commented 2 years ago

Hi @saurabhgoyalgithub, I believe Aaron has already shared the details with you but wanted to respond here for future reference.

The field apiManagerMetrics.apis.{environment}.total refers to the total number of API specs managed in the environment. It is listed under the available metrics table in the README The field $.apiManagerMetrics.apis.{environment}.apiInstances is the total count of all API instances. Each API spec can have many managed instances, which is why this count is greater. The active and inactive count should total the total instance count.

I understand how this can be confusing due to the naming. This is how the fields are named in the platform API and the same was used in the metrics toolkit. Changing the names of these fields would introduce breaking changes to the toolkit, so we will not be changing the names right now.

Hopefully this helps to clarify. If you have further questions, or notice discrepancies in these counts please do let us know. Thanks and regards, Richard