sonatype-nexus-community / nexus-blobstore-google-cloud

Nexus Repository Manager Blobstore backed by Google Cloud Storage
https://help.sonatype.com/en/configuring-blob-stores.html#google-cloud-blob-store
Eclipse Public License 1.0
39 stars 16 forks source link

Loading cache observability #32

Closed nblair closed 5 years ago

nblair commented 5 years ago

Nexus Repository Manager Blobstore implementations use a Guava LoadingCache around the identifiers for Blob assets.

We don't have enough visibility into the use of this cache (hit/miss/success/failure). This changeset registers a number of the LoadingCache metrics with NXRM's MetricRegistry.

The result is their presence in /service/metrics/data:

"org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStore.liveBlobsCache.evictionCount": {
      "value": 5616
    },
    "org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStore.liveBlobsCache.hitCount": {
      "value": 10577
    },
    "org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStore.liveBlobsCache.missCount": {
      "value": 11124
    },
   "org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStore.liveBlobsCache.requestCount": {
      "value": 21701
    },
    "org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStore.liveBlobsCache.size": {
      "value": 672
    },
    "org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStore.liveBlobsCache.totalLoadTime": {
      "value": 52228060
    },