Skip to content

Update app_name attribute to use VCAP_APPLICATION.name#413

Draft
sjvans wants to merge 1 commit intomainfrom
fix-sap.cf.app_name
Draft

Update app_name attribute to use VCAP_APPLICATION.name#413
sjvans wants to merge 1 commit intomainfrom
fix-sap.cf.app_name

Conversation

@sjvans
Copy link
Contributor

@sjvans sjvans commented Mar 3, 2026

No description provided.

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'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const name = VCAP_APPLICATION?.name || PKG?.name || 'CAP Application'

IMO: yes. I think we should only use deployment identifiers for OTel ids / names / keys. That is: I can't think of a scenario where a name attribute on root level should reference the package name rather than the deployment id 🤷‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants