> Source: https://www.ymotongpoo.com/works/otel-specs-ja/semconv/resource/cloudfoundry/


# CloudFoundry

**ステータス**: [Development][DocumentStatus]

CloudFoundryのメタデータを理解するのに役立つ資料:

* <https://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#VCAP-APPLICATION>
* <https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html>
* <https://github.com/cloudfoundry/loggregator-api#v2-envelope>
* <https://bosh.io/docs/jobs/#properties-spec>

CloudFoundryは、アプリケーションのデプロイメント（app）を、organization（org）に含まれるspaceによって整理します。名前は、それぞれを包含するentity内でのみ一意です。IDはCloudFoundryのインストール全体で一意です。同じアプリケーションの異なるインスタンスは、整数のインデックスで区別されます。アプリケーションは、メインジョブと複数のタスク、サイドカーから構成できます。それらは異なるprocess属性によって区別できます。

CloudFoundryは、システムコンポーネントからシグナルを発することもできます。これらはorgとspaceに整理されていないため、アプリケーションとは異なるアプローチを取ります。これらは、CloudFoundryのBoshデプロイメントツールに沿ったものです。

## Organization

<!-- semconv entity.cloudfoundry.org -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `cloudfoundry.org`

**Description:** 監視対象のアプリケーションのorganization。

> [!warning]
> このEntity定義には、roleを持たない属性が含まれています。
> 安定版のEntityは、roleが定義されていない属性を持ってはなりません（MUST NOT）。

**Attributes:**

| Role | Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Other | [`cloudfoundry.org.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | そのアプリケーションが実行されているCloudFoundry orgのguid。[1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` |
| Other | [`cloudfoundry.org.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | そのアプリケーションが実行されているCloudFoundry organizationの名前。[2] | `my-org-name` |

**[1] `cloudfoundry.org.id`:** アプリケーションの計装は、環境変数`VCAP_APPLICATION.org_id`の値を使用すべきです。これは、`cf org <org-name> --guid`で報告される値と同じです。

**[2] `cloudfoundry.org.name`:** アプリケーションの計装は、環境変数`VCAP_APPLICATION.org_name`の値を使用すべきです。これは、`cf orgs`で報告される値と同じです。
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Space

<!-- semconv entity.cloudfoundry.space -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `cloudfoundry.space`

**Description:** 監視対象のアプリケーションのspace。

> [!warning]
> このEntity定義には、roleを持たない属性が含まれています。
> 安定版のEntityは、roleが定義されていない属性を持ってはなりません（MUST NOT）。

**Attributes:**

| Role | Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Other | [`cloudfoundry.space.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | そのアプリケーションが実行されているCloudFoundry spaceのguid。[1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` |
| Other | [`cloudfoundry.space.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | そのアプリケーションが実行されているCloudFoundry spaceの名前。[2] | `my-space-name` |

**[1] `cloudfoundry.space.id`:** アプリケーションの計装は、環境変数`VCAP_APPLICATION.space_id`の値を使用すべきです。これは、`cf space <space-name> --guid`で報告される値と同じです。

**[2] `cloudfoundry.space.name`:** アプリケーションの計装は、環境変数`VCAP_APPLICATION.space_name`の値を使用すべきです。これは、`cf spaces`で報告される値と同じです。
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Application

<!-- semconv entity.cloudfoundry.app -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `cloudfoundry.app`

**Description:** 監視対象のアプリケーション。

> [!warning]
> このEntity定義には、roleを持たない属性が含まれています。
> 安定版のEntityは、roleが定義されていない属性を持ってはなりません（MUST NOT）。

**Attributes:**

| Role | Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Other | [`cloudfoundry.app.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | そのアプリケーションのguid。[1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` |
| Other | [`cloudfoundry.app.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | そのアプリケーションの名前。[2] | `my-app-name` |

**[1] `cloudfoundry.app.id`:** アプリケーションの計装は、環境変数`VCAP_APPLICATION.application_id`の値を使用すべきです。これは、`cf app <app-name> --guid`で報告される値と同じです。

**[2] `cloudfoundry.app.name`:** アプリケーションの計装は、環境変数`VCAP_APPLICATION.application_name`の値を使用すべきです。これは、`cf apps`で報告される値と同じです。
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Process

<!-- semconv entity.cloudfoundry.process -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `cloudfoundry.process`

**Description:** 監視対象のアプリケーションのプロセス。

> [!warning]
> このEntity定義には、roleを持たない属性が含まれています。
> 安定版のEntityは、roleが定義されていない属性を持ってはなりません（MUST NOT）。

**Attributes:**

| Role | Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Other | [`cloudfoundry.process.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | そのプロセスを識別するUID。[1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` |
| Other | [`cloudfoundry.process.type`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | プロセスの種別。[2] | `web` |

**[1] `cloudfoundry.process.id`:** アプリケーションの計装は、環境変数`VCAP_APPLICATION.process_id`の値を使用すべきです。ランタイムにデプロイされたアプリケーションの場合、これは`VCAP_APPLICATION.app_id`と等しいはずです。システムコンポーネントの場合、これは実際のPIDである可能性があります。

**[2] `cloudfoundry.process.type`:** CloudFoundryのアプリケーションは、複数のジョブから構成できます。通常、メインプロセスは`web`という種別になります。異なるプロセス種別を持つ、追加のバックグラウンドタスクやサイドカーが存在する場合もあります。
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Cloud Foundry System component

<!-- semconv entity.cloudfoundry.system -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

**type:** `cloudfoundry.system`

**Description:** 監視対象のシステムコンポーネント。

> [!warning]
> このEntity定義には、roleを持たない属性が含まれています。
> 安定版のEntityは、roleが定義されていない属性を持ってはなりません（MUST NOT）。

**Attributes:**

| Role | Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Other | [`cloudfoundry.system.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | イベントの発生源を記述する、guidまたは他の名前。[1] | `cf/gorouter` |
| Other | [`cloudfoundry.system.instance.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/cloudfoundry/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | イベントの発生源の具体的なインスタンスを記述する、guid。[2] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` |

**[1] `cloudfoundry.system.id`:** CloudFoundryは、[Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope)で`source_id`を定義しています。
これは、CloudFoundryが発するログとメトリクスに使われます。CloudFoundryのコンポーネントについては、コンポーネント名（例えば"gorouter"）を含むことが想定されています。

システムコンポーネントを計装する場合、[Boshスペック](https://bosh.io/docs/jobs/#properties-spec)の値を使用すべきです。`system.id`は`spec.deployment/spec.name`に設定すべきです。

**[2] `cloudfoundry.system.instance.id`:** CloudFoundryは、[Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope)で`instance_id`を定義しています。
これは、CloudFoundryが発するログとメトリクスに使われます。CloudFoundryのコンポーネントについては、vm IDを含むことが想定されています。

システムコンポーネントを計装する場合、[Boshスペック](https://bosh.io/docs/jobs/#properties-spec)の値を使用すべきです。`system.instance.id`は`spec.id`に設定すべきです。
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

[DocumentStatus]: /works/otel-specs-ja/spec/document-status/

