# CloudFoundry ## CloudFoundry App **Status:** ![Development](https://img.shields.io/badge/-development-blue) **type:** `cloudfoundry.app` **Description:** The application which is monitored. **Other Attributes:** > :warning: This entity definition contains attributes without a role. > Stable Entities MUST NOT have attributes without a defined role. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.app.id`](/docs/registry/attributes/cloudfoundry.md) | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`cloudfoundry.app.name`](/docs/registry/attributes/cloudfoundry.md) | string | The name of the application. [2] | `my-app-name` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | **[1] `cloudfoundry.app.id`:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.application_id`. This is the same value as reported by `cf app --guid`. **[2] `cloudfoundry.app.name`:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.application_name`. This is the same value as reported by `cf apps`. ## CloudFoundry Org **Status:** ![Development](https://img.shields.io/badge/-development-blue) **type:** `cloudfoundry.org` **Description:** The organization of the application which is monitored. **Other Attributes:** > :warning: This entity definition contains attributes without a role. > Stable Entities MUST NOT have attributes without a defined role. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.org.id`](/docs/registry/attributes/cloudfoundry.md) | string | The guid of the CloudFoundry org the application is running in. [3] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`cloudfoundry.org.name`](/docs/registry/attributes/cloudfoundry.md) | string | The name of the CloudFoundry organization the app is running in. [4] | `my-org-name` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | **[3] `cloudfoundry.org.id`:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_id`. This is the same value as reported by `cf org --guid`. **[4] `cloudfoundry.org.name`:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_name`. This is the same value as reported by `cf orgs`. ## CloudFoundry Process **Status:** ![Development](https://img.shields.io/badge/-development-blue) **type:** `cloudfoundry.process` **Description:** The process of the application which is monitored. **Other Attributes:** > :warning: This entity definition contains attributes without a role. > Stable Entities MUST NOT have attributes without a defined role. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.process.id`](/docs/registry/attributes/cloudfoundry.md) | string | The UID identifying the process. [5] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`cloudfoundry.process.type`](/docs/registry/attributes/cloudfoundry.md) | string | The type of process. [6] | `web` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | **[5] `cloudfoundry.process.id`:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to `VCAP_APPLICATION.app_id` for applications deployed to the runtime. For system components, this could be the actual PID. **[6] `cloudfoundry.process.type`:** CloudFoundry applications can consist of multiple jobs. Usually the main process will be of type `web`. There can be additional background tasks or side-cars with different process types. ## CloudFoundry Space **Status:** ![Development](https://img.shields.io/badge/-development-blue) **type:** `cloudfoundry.space` **Description:** The space of the application which is monitored. **Other Attributes:** > :warning: This entity definition contains attributes without a role. > Stable Entities MUST NOT have attributes without a defined role. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.space.id`](/docs/registry/attributes/cloudfoundry.md) | string | The guid of the CloudFoundry space the application is running in. [7] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`cloudfoundry.space.name`](/docs/registry/attributes/cloudfoundry.md) | string | The name of the CloudFoundry space the application is running in. [8] | `my-space-name` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | **[7] `cloudfoundry.space.id`:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_id`. This is the same value as reported by `cf space --guid`. **[8] `cloudfoundry.space.name`:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_name`. This is the same value as reported by `cf spaces`. ## CloudFoundry System **Status:** ![Development](https://img.shields.io/badge/-development-blue) **type:** `cloudfoundry.system` **Description:** The system component which is monitored. **Other Attributes:** > :warning: This entity definition contains attributes without a role. > Stable Entities MUST NOT have attributes without a defined role. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.system.id`](/docs/registry/attributes/cloudfoundry.md) | string | A guid or another name describing the event source. [9] | `cf/gorouter` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | | [`cloudfoundry.system.instance.id`](/docs/registry/attributes/cloudfoundry.md) | string | A guid describing the concrete instance of the event source. [10] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | **[9] `cloudfoundry.system.id`:** CloudFoundry defines the `source_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is used for logs and metrics emitted by CloudFoundry. It is supposed to contain the component name, e.g. "gorouter", for CloudFoundry components. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) should be used. The `system.id` should be set to `spec.deployment/spec.name`. **[10] `cloudfoundry.system.instance.id`:** CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is used for logs and metrics emitted by CloudFoundry. It is supposed to contain the vm id for CloudFoundry components. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) should be used. The `system.instance.id` should be set to `spec.id`.