Usage Service lists old space names as well as latest name after space name changes
search cancel

Usage Service lists old space names as well as latest name after space name changes

book

Article ID: 427230

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

The Usage Service fails to reflect the updated space name after a cf rename-space operation. While the foundation correctly recognizes the new name for space rename operations, the generated usage reports still list both old and new space names. 

This can be confirmed via Apps Manager UI, cf CLI or Usage Service API. For below example, the space name has been renamed from old_space_name to new_space_name. Only the new(latest) space name is expected, but Usage Service API returns both space names. 

$ curl "https://app-usage.<DOMAIN>/organizations/<ORG_GUID>/service_usages?start=YYYY-MM-DD&end=YYYY-MM-DD" -k -v -H "authorization: `cf oauth-token`"

{
  ...
  "service_usages": [
    {
      "deleted": true,
      "duration_in_seconds": ###,
      "space_guid": "ce060490-2767-4392-a965-d52360c0848b",
      "space_name": "old_space_name",
      "service_instance_guid": "80ddb84b-86f4-4748-abd2-2638fff88145",
      "service_instance_name": "test_instance",
      "service_instance_creation": "2025-09-15T19:37:37.000Z",
      "service_instance_deletion": "2025-09-15T19:45:41.000Z",
      ...
    },
    {
      "deleted": true,
      "duration_in_seconds": ###,
      "space_guid": "ce060490-2767-4392-a965-d52360c0848b",
      "space_name": "new_space_name",
      "service_instance_guid": "80ddb84b-86f4-4748-abd2-2638fff88145",
      "service_instance_name": "test_instance",
      "service_guid": "cb4c1349-6ae2-4a7c-905e-7b034698bd47",
      "service_instance_creation": "2025-09-16T11:34:31.000Z",
      "service_instance_deletion": "2025-09-17T18:41:44.000Z",
      ...
    },
    ...
  ]

Cause

This is caused by a known issue within Usage Service how it decides the latest space name. 

Resolution

There is no workaround available at this point, it is recommended to group usage with space_guid other than space_name. A fix will be available in future Elastic Application Runtime release.