-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
contribution welcomeRequest makes sense, maintainers probably won't have time, contribution would be welcomeRequest makes sense, maintainers probably won't have time, contribution would be welcomeenhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
When running an application as a CloudFoundry deployment, the Cloud Foundry attributes should be filled automatically. This allows connecting the observability data with the application metadata as used by Cloud Foundry.
Describe the solution you'd like
An application deployed to Cloud Foundry receives the necessary metadata in the environment variable VCAP_APPLICATION. The contents of this variable is a JSON document whose fields can be mapped to the CloudFoundry attributes by the following mapping.
- VCAP_APPLICATION(application_id) -> cloudfoundry.app.id
- VCAP_APPLICATION(application_name) -> cloudfoundry.app.name
- VCAP_APPLICATION(instance_index) -> cloudfoundry.app.instance.id (convert int to string)
- VCAP_APPLICATION(organization_id) -> cloudfoundry.org.id
- VCAP_APPLICATION(organization_name) -> cloudfoundry.org.name
- VCAP_APPLICATION(process_id) -> cloudfoundry.process.id
- VCAP_APPLICATION(process_type) -> cloudfoundry.process.type
- VCAP_APPLICATION(space_id) -> cloudfoundry.space.id
- VCAP_APPLICATION(space_name) -> cloudfoundry.space.name
All of this can be done in a ResourceProvider, that searches for the environment variable VCAP_APPLICATION and applies this mapping, if it is found.
Describe alternatives you've considered
CloudFoundry developers can run custom extensions on the Java Agent to provide this functionality.
Additional context
No response
Metadata
Metadata
Assignees
Labels
contribution welcomeRequest makes sense, maintainers probably won't have time, contribution would be welcomeRequest makes sense, maintainers probably won't have time, contribution would be welcomeenhancementNew feature or requestNew feature or request