From 42ab47c9bb55d9a74db2ac749d6742cf1ca771ee Mon Sep 17 00:00:00 2001 From: sjvans <30337871+sjvans@users.noreply.github.com> Date: Tue, 3 Mar 2026 22:02:37 +0100 Subject: [PATCH 1/2] Update app_name attribute to use VCAP_APPLICATION.name --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index ff38627..15e72b9 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -61,7 +61,7 @@ function getResource() { if (VCAP_APPLICATION) { attributes['sap.cf.source_id'] = VCAP_APPLICATION.application_id attributes['sap.cf.app_id'] = VCAP_APPLICATION.application_id - attributes['sap.cf.app_name'] = name + attributes['sap.cf.app_name'] = VCAP_APPLICATION.name attributes['sap.cf.space_id'] = VCAP_APPLICATION.space_id attributes['sap.cf.space_name'] = VCAP_APPLICATION.space_name attributes['sap.cf.org_id'] = VCAP_APPLICATION.organization_id From 42b863a1eb2190a5aeec96bcd1858a68012ff75c Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 23 Mar 2026 17:56:22 +0100 Subject: [PATCH 2/2] fix: prefer vcap_application.name for root name --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 15e72b9..bfa0319 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -40,7 +40,7 @@ function getResource() { LOG._info && LOG.info('Unable to require package.json to resolve app name and version due to error:', err) } - const name = PKG?.name || VCAP_APPLICATION?.name || 'CAP Application' + const name = VCAP_APPLICATION?.name || PKG?.name || 'CAP Application' const version = PKG?.version || VCAP_APPLICATION?.application_version || '1.0.0' const attributes = {}