Hello, Community.
I'm currently developing a Python package that I would like to deploy using Artifact Registry, for authentication/security purposes.
Reading the docs, I didn't find anything related to repositories/package metrics, such as number of downloads. Is there any solution for this?
Solved! Go to Solution.
There is no feature to track the metrics in Artifact Registry, but you can use the tools (cloud functions, pub/sub) provided by Google to be able to track the metrics:
Enable Artifact Registry data logs[1]:
4. Create a Pub/Sub topic [2].
5. Enable and export logs from the Artifact Registry instance to your Pub/Sub topic by creating a sink on Logging by following the steps described here [3].
6. Create a Cloud Function and use your Pub/Sub topic to trigger it.
7. Create a cloud function to create your custom metrics (here; for example, you can choose to monitor downloads) as shown in [4].
[1]:https://cloud.google.com/logging/docs/audit/configure-data-access
[2]:https://cloud.google.com/pubsub/docs/admin#pubsub_create_topic-gcloud
[3]:https://cloud.google.com/logging/docs/export/configure_export_v2#console
There is no feature to track the metrics in Artifact Registry, but you can use the tools (cloud functions, pub/sub) provided by Google to be able to track the metrics:
Enable Artifact Registry data logs[1]:
4. Create a Pub/Sub topic [2].
5. Enable and export logs from the Artifact Registry instance to your Pub/Sub topic by creating a sink on Logging by following the steps described here [3].
6. Create a Cloud Function and use your Pub/Sub topic to trigger it.
7. Create a cloud function to create your custom metrics (here; for example, you can choose to monitor downloads) as shown in [4].
[1]:https://cloud.google.com/logging/docs/audit/configure-data-access
[2]:https://cloud.google.com/pubsub/docs/admin#pubsub_create_topic-gcloud
[3]:https://cloud.google.com/logging/docs/export/configure_export_v2#console
Thank you, Andre!