From 7bd0436beb30b40bbc9584c6a587b952ec79f09d Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Wed, 27 Dec 2023 15:23:27 +0100 Subject: [PATCH 01/18] Add CloudFoundry resource attributes Using the CloudFoundry documentation, provides a set of resource attribute describing CloudFoundry workloads. Both applications as well as system components are addressed. Helpful resources: * https://github.com/cloudfoundry/loggregator-api#v2-envelope * https://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#VCAP-APPLICATION * https://bosh.io/docs/jobs/#properties-spec * https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html Signed-off-by: Karsten Schnitter --- docs/attributes-registry/README.md | 1 + docs/attributes-registry/cloudfoundry.md | 90 ++++++++++++ docs/resource/README.md | 1 + docs/resource/cloudfoundry.md | 167 +++++++++++++++++++++++ model/registry/cloudfoundry.yaml | 137 +++++++++++++++++++ model/resource/cloudfoundry.yaml | 48 +++++++ 6 files changed, 444 insertions(+) create mode 100644 docs/attributes-registry/cloudfoundry.md create mode 100644 docs/resource/cloudfoundry.md create mode 100644 model/registry/cloudfoundry.yaml create mode 100644 model/resource/cloudfoundry.yaml diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index ada3b9534f..4ec923895b 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -30,6 +30,7 @@ Currently, the following namespaces exist: * [Browser](browser.md) * [Client](client.md) * [Cloud](cloud.md) +* [CloudFoundry](cloudfoundry.md) * [Code](code.md) * [Container](container.md) * [DB](db.md) (database) diff --git a/docs/attributes-registry/cloudfoundry.md b/docs/attributes-registry/cloudfoundry.md new file mode 100644 index 0000000000..2c524d00d7 --- /dev/null +++ b/docs/attributes-registry/cloudfoundry.md @@ -0,0 +1,90 @@ + + +# CloudFoundry + +## CloudFoundry Resource Attributes + + +| Attribute | Type | Description | Examples | +|---|---|---|---| +| `cloudfoundry.app.id` | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | +| `cloudfoundry.app.name` | string | The name of the application. [2] | `my-app-name` | +| `cloudfoundry.instance_id` | string | An index or guid describing the concrete instance of the event source. [3] | `0`; `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | +| `cloudfoundry.org.id` | string | The guid of the CloudFoundry org the application is running in. [4] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | +| `cloudfoundry.org.name` | string | The name of the CloudFoundry organization the app is running in. [5] | `my-org-name` | +| `cloudfoundry.process.id` | string | The UID identifying the process. [6] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | +| `cloudfoundry.process.type` | string | The type of process. [7] | `web` | +| `cloudfoundry.source_id` | string | A guid or another name describing the event source. [8] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d`; `cf/gorouter` | +| `cloudfoundry.source_type` | string | The type of the event source. [9] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | +| `cloudfoundry.space.id` | string | The guid of the CloudFoundry space the application is running in. [10] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | +| `cloudfoundry.space.name` | string | The name of the CloudFoundry space the application is running in. [11] | `my-space-name` | + +**[1]:** 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]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.application_name`. This is the same value +as reported by `cf apps`. + +**[3]:** CloudFoundry defines the `instance_id` in the [Loggegator 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 application instance index for applications +deployed on the runtime or the vm id for CloudFoundry components. + +Application instrumentation should use the value from environment +variable `CF_INSTANCE_INDEX`. + +When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) +should be used. The `instance_id` should be set to `spec.id`. + +**[4]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.org_id`. This is the same value as +reported by `cf org --guid`. + +**[5]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.org_name`. This is the same value as +reported by `cf orgs`. + +**[6]:** 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. + +**[7]:** 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. + +**[8]:** CloudFoundry defines the `source_id` in the [Loggegator 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 application id for applications deployed on +the runtime or the component name, e.g. "gorouter", for CloudFoundry +components. + +Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.application_id`. This is the same value as +reported by `cf app --guid`. + +When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) +should be used. The `source_id` should be set to +`spec.deployment/spec.name`. + +**[9]:** CloudFoundry generates log messages with different source types for an +applications. This indicates, whether the log was created from the +actual application, a background task, the central load balancer, or +the CloudFoundry runtime, e.g. during a deployment. + +The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). +It is also available in the syslog drain structured data as documented +in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). + +**[10]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.space_id`. This is the same value as +reported by `cf space --guid`. + +**[11]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.space_name`. This is the same value as +reported by `cf spaces`. + \ No newline at end of file diff --git a/docs/resource/README.md b/docs/resource/README.md index a77cbd2f69..f2ff9e81b8 100644 --- a/docs/resource/README.md +++ b/docs/resource/README.md @@ -210,6 +210,7 @@ Attributes defining a running environment (e.g. Operating System, Cloud, Data Ce - Deployment: - [Deployment Environment](./deployment-environment.md) - [Kubernetes](./k8s.md) + - [CloudFoundry](./cloudfoundry.md) - [Browser](./browser.md) ## Version attributes diff --git a/docs/resource/cloudfoundry.md b/docs/resource/cloudfoundry.md new file mode 100644 index 0000000000..f4ea14ad40 --- /dev/null +++ b/docs/resource/cloudfoundry.md @@ -0,0 +1,167 @@ +# CloudFoundry + +**Status**: [Experimental][DocumentStatus] + +Useful resources to understand CloudFoundry metadata: + +* +* +* +* + +CloudFoundry organizes application deployments (apps) by spaces contained in +organizations (orgs). Names are unique only in their respective enclosing +entity. Ids are unique in the entire CloudFoundry installation. Different +instances of the same application are separated by an integer index. Apps can +consist of a main job and multiple tasks and side-cars, which can be +distinguished by different process attributes. + +CloudFoundry can also emit signals from system components. They use a different +approach as applications, since they are not organized into orgs and spaces. +They align with the Bosh deployment tool of CloudFoundry. + +## Organization + +**type:** `cloudfoundry.org` + +**Description:** A CloudFoundry Organization + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| [`cloudfoundry.org.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the CloudFoundry org the application is running in. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended | +| [`cloudfoundry.org.name`](../attributes-registry/cloudfoundry.md) | string | The name of the CloudFoundry organization the app is running in. [2] | `my-org-name` | Recommended | + +**[1]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.org_id`. This is the same value as +reported by `cf org --guid`. + +**[2]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.org_name`. This is the same value as +reported by `cf orgs`. + + +## Space + +**type:** `cloudfoundry.space` + +**Description:** A CloudFoundry Space + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| [`cloudfoundry.space.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the CloudFoundry space the application is running in. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended | +| [`cloudfoundry.space.name`](../attributes-registry/cloudfoundry.md) | string | The name of the CloudFoundry space the application is running in. [2] | `my-space-name` | Recommended | + +**[1]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.space_id`. This is the same value as +reported by `cf space --guid`. + +**[2]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.space_name`. This is the same value as +reported by `cf spaces`. + + +## Application + +***type:** `cloudfoundry.app` + +**Description:** A CloudFoundry Application + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| [`cloudfoundry.app.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended | +| [`cloudfoundry.app.name`](../attributes-registry/cloudfoundry.md) | string | The name of the application. [2] | `my-app-name` | Recommended | + +**[1]:** 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]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.application_name`. This is the same value +as reported by `cf apps`. + + +## Process + +**type:** `cloudfoundry.process` + +**Description:** A CloudFoundry Application Process + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| [`cloudfoundry.process.id`](../attributes-registry/cloudfoundry.md) | string | The UID identifying the process. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended | +| [`cloudfoundry.process.type`](../attributes-registry/cloudfoundry.md) | string | The type of process. [2] | `web` | Recommended | + +**[1]:** 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. + +**[2]:** 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. + + +## Generic Source + +**type:** `cloudfoundry` + +**Description:** The generic source (app or system component) + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| [`cloudfoundry.instance_id`](../attributes-registry/cloudfoundry.md) | string | An index or guid describing the concrete instance of the event source. [1] | `0`; `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Required | +| [`cloudfoundry.source_id`](../attributes-registry/cloudfoundry.md) | string | A guid or another name describing the event source. [2] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d`; `cf/gorouter` | Required | + +**[1]:** CloudFoundry defines the `instance_id` in the [Loggegator 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 application instance index for applications +deployed on the runtime or the vm id for CloudFoundry components. + +Application instrumentation should use the value from environment +variable `CF_INSTANCE_INDEX`. + +When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) +should be used. The `instance_id` should be set to `spec.id`. + +**[2]:** CloudFoundry defines the `source_id` in the [Loggegator 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 application id for applications deployed on +the runtime or the component name, e.g. "gorouter", for CloudFoundry +components. + +Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.application_id`. This is the same value as +reported by `cf app --guid`. + +When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) +should be used. The `source_id` should be set to +`spec.deployment/spec.name`. + + +## Source Type + +**type:**`cloudfoundry.source_type` + +**Description:** The CloudFoundry source type. + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| [`cloudfoundry.source_type`](../attributes-registry/cloudfoundry.md) | string | The type of the event source. [1] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | Recommended | + +**[1]:** CloudFoundry generates log messages with different source types for an +applications. This indicates, whether the log was created from the +actual application, a background task, the central load balancer, or +the CloudFoundry runtime, e.g. during a deployment. + +The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). +It is also available in the syslog drain structured data as documented +in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). + + +[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md diff --git a/model/registry/cloudfoundry.yaml b/model/registry/cloudfoundry.yaml new file mode 100644 index 0000000000..b921648add --- /dev/null +++ b/model/registry/cloudfoundry.yaml @@ -0,0 +1,137 @@ +groups: + - id: registry.cloudfoundry + prefix: cloudfoundry + type: resource + brief: > + CloudFoundry resource attributes. + attributes: + - id: source_id + type: string + brief: > + A guid or another name describing the event source. + note: | + CloudFoundry defines the `source_id` in the [Loggegator 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 application id for applications deployed on + the runtime or the component name, e.g. "gorouter", for CloudFoundry + components. + + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.application_id`. This is the same value as + reported by `cf app --guid`. + + When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) + should be used. The `source_id` should be set to + `spec.deployment/spec.name`. + examples: + - '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' + - 'cf/gorouter' + - id: instance_id + type: string + brief: > + An index or guid describing the concrete instance of the event source. + note: | + CloudFoundry defines the `instance_id` in the [Loggegator 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 application instance index for applications + deployed on the runtime or the vm id for CloudFoundry components. + + Application instrumentation should use the value from environment + variable `CF_INSTANCE_INDEX`. + + When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) + should be used. The `instance_id` should be set to `spec.id`. + examples: + - '0' + - '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' + - id: app.name + type: string + brief: > + The name of the application. + note: | + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.application_name`. This is the same value + as reported by `cf apps`. + examples: ['my-app-name'] + - id: app.id + type: string + brief: > + The guid of the application. + note: | + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.application_id`. This is the same value as + reported by `cf app --guid`. + examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] + - id: space.name + type: string + brief: > + The name of the CloudFoundry space the application is running in. + note: | + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.space_name`. This is the same value as + reported by `cf spaces`. + examples: ['my-space-name'] + - id: space.id + type: string + brief: > + The guid of the CloudFoundry space the application is running in. + note: | + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.space_id`. This is the same value as + reported by `cf space --guid`. + examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] + - id: org.name + type: string + brief: > + The name of the CloudFoundry organization the app is running in. + note: | + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.org_name`. This is the same value as + reported by `cf orgs`. + examples: ['my-org-name'] + - id: org.id + type: string + brief: > + The guid of the CloudFoundry org the application is running in. + note: | + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.org_id`. This is the same value as + reported by `cf org --guid`. + examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] + - id: source_type + type: string + brief: > + The type of the event source. + note: | + CloudFoundry generates log messages with different source types for an + applications. This indicates, whether the log was created from the + actual application, a background task, the central load balancer, or + the CloudFoundry runtime, e.g. during a deployment. + + The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). + It is also available in the syslog drain structured data as documented + in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). + examples: + - 'APP/PROC/WEB/0' + - 'APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4' + - 'RTR' + - 'STG' + - id: process.id + type: string + brief: > + The UID identifying the process. + note: | + 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. + examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] + - id: process.type + type: string + brief: > + The type of process. + note: | + 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. + examples: ['web'] diff --git a/model/resource/cloudfoundry.yaml b/model/resource/cloudfoundry.yaml new file mode 100644 index 0000000000..412cdc9ad7 --- /dev/null +++ b/model/resource/cloudfoundry.yaml @@ -0,0 +1,48 @@ +groups: + - id: cloudfoundry + prefix: cloudfoundry + type: resource + brief: > + A CloudFoundry application or sytem component. + attributes: + - ref: cloudfoundry.source_id + requirement_level: required + tag: generic + - ref: cloudfoundry.instance_id + requirement_level: required + tag: generic + - ref: cloudfoundry.source_type + requirement_level: recommended + tag: source_type + - id: cloudfoundry.app + prefix: cloudfoundry.app + type: resource + brief: > + The application which is monitored. + attributes: + - ref: cloudfoundry.app.id + - ref: cloudfoundry.app.name + - id: cloudfoundry.space + prefix: cloudfoundry.space + type: resource + brief: > + The space of the application which is monitored. + attributes: + - ref: cloudfoundry.space.id + - ref: cloudfoundry.space.name + - id: cloudfoundry.org + prefix: cloudfoundry.org + type: resource + brief: > + The organization of the application which is monitored. + attributes: + - ref: cloudfoundry.org.id + - ref: cloudfoundry.org.name + - id: cloudfoundry.process + prefix: cloudfoundry.process + type: resource + brief: > + The process of the application which is monitored. + attributes: + - ref: cloudfoundry.process.id + - ref: cloudfoundry.process.type From 7a9b0b43e0770fdc8739f5ae0e0f641fed4b6be0 Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Thu, 11 Jan 2024 10:03:12 +0100 Subject: [PATCH 02/18] Add Changelog Entry for CloudFoundry Signed-off-by: Karsten Schnitter --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f597bc797..9987d6a1d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ release. ([#615](https://github.com/open-telemetry/semantic-conventions/pull/615)) - Add an example for gcp_pubsub asynchronous batch publish ([#545](https://github.com/open-telemetry/semantic-conventions/pull/545)). +- Add a CloudFoundry convention ([#624](https://github.com/open-telemetry/semantic-conventions/pull/624)). ### Fixes From f4efa59cb867839b3c44bddd3378d9ae429e8d7f Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Mon, 15 Jan 2024 09:48:19 +0100 Subject: [PATCH 03/18] Rename CF generic attributes * source_id -> source.id * instance_id -> instance.id * source_type -> source.type Add clarification on source_type: * required if log message * comment on obtaining the value Signed-off-by: Karsten Schnitter --- docs/attributes-registry/cloudfoundry.md | 13 ++++++++----- docs/resource/cloudfoundry.md | 17 ++++++++++------- model/registry/cloudfoundry.yaml | 13 ++++++++----- model/resource/cloudfoundry.yaml | 11 ++++++----- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/docs/attributes-registry/cloudfoundry.md b/docs/attributes-registry/cloudfoundry.md index 2c524d00d7..418fa736bb 100644 --- a/docs/attributes-registry/cloudfoundry.md +++ b/docs/attributes-registry/cloudfoundry.md @@ -11,13 +11,13 @@ linkTitle: CloudFoundry |---|---|---|---| | `cloudfoundry.app.id` | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | | `cloudfoundry.app.name` | string | The name of the application. [2] | `my-app-name` | -| `cloudfoundry.instance_id` | string | An index or guid describing the concrete instance of the event source. [3] | `0`; `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | +| `cloudfoundry.instance.id` | string | An index or guid describing the concrete instance of the event source. [3] | `0`; `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | | `cloudfoundry.org.id` | string | The guid of the CloudFoundry org the application is running in. [4] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | | `cloudfoundry.org.name` | string | The name of the CloudFoundry organization the app is running in. [5] | `my-org-name` | | `cloudfoundry.process.id` | string | The UID identifying the process. [6] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | | `cloudfoundry.process.type` | string | The type of process. [7] | `web` | -| `cloudfoundry.source_id` | string | A guid or another name describing the event source. [8] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d`; `cf/gorouter` | -| `cloudfoundry.source_type` | string | The type of the event source. [9] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | +| `cloudfoundry.source.id` | string | A guid or another name describing the event source. [8] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d`; `cf/gorouter` | +| `cloudfoundry.source.type` | string | The type of the event source. [9] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | | `cloudfoundry.space.id` | string | The guid of the CloudFoundry space the application is running in. [10] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | | `cloudfoundry.space.name` | string | The name of the CloudFoundry space the application is running in. [11] | `my-space-name` | @@ -38,7 +38,7 @@ Application instrumentation should use the value from environment variable `CF_INSTANCE_INDEX`. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) -should be used. The `instance_id` should be set to `spec.id`. +should be used. The `instance.id` should be set to `spec.id`. **[4]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_id`. This is the same value as @@ -68,7 +68,7 @@ variable `VCAP_APPLICATION.application_id`. This is the same value as reported by `cf app --guid`. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) -should be used. The `source_id` should be set to +should be used. The `source.id` should be set to `spec.deployment/spec.name`. **[9]:** CloudFoundry generates log messages with different source types for an @@ -79,6 +79,9 @@ the CloudFoundry runtime, e.g. during a deployment. The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is also available in the syslog drain structured data as documented in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). +Application developers can access the value of the `source_type` in +the log stream generated by `cf logs `, usually in square +brackets. **[10]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_id`. This is the same value as diff --git a/docs/resource/cloudfoundry.md b/docs/resource/cloudfoundry.md index f4ea14ad40..9708ff4af1 100644 --- a/docs/resource/cloudfoundry.md +++ b/docs/resource/cloudfoundry.md @@ -114,8 +114,8 @@ tasks or side-cars with different process types. | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| [`cloudfoundry.instance_id`](../attributes-registry/cloudfoundry.md) | string | An index or guid describing the concrete instance of the event source. [1] | `0`; `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Required | -| [`cloudfoundry.source_id`](../attributes-registry/cloudfoundry.md) | string | A guid or another name describing the event source. [2] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d`; `cf/gorouter` | Required | +| [`cloudfoundry.instance.id`](../attributes-registry/cloudfoundry.md) | string | An index or guid describing the concrete instance of the event source. [1] | `0`; `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Required | +| [`cloudfoundry.source.id`](../attributes-registry/cloudfoundry.md) | string | A guid or another name describing the event source. [2] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d`; `cf/gorouter` | Required | **[1]:** CloudFoundry defines the `instance_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is used for logs and metrics emitted by CloudFoundry. It is @@ -126,7 +126,7 @@ Application instrumentation should use the value from environment variable `CF_INSTANCE_INDEX`. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) -should be used. The `instance_id` should be set to `spec.id`. +should be used. The `instance.id` should be set to `spec.id`. **[2]:** CloudFoundry defines the `source_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is used for logs and metrics emitted by CloudFoundry. It is @@ -139,20 +139,20 @@ variable `VCAP_APPLICATION.application_id`. This is the same value as reported by `cf app --guid`. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) -should be used. The `source_id` should be set to +should be used. The `source.id` should be set to `spec.deployment/spec.name`. ## Source Type -**type:**`cloudfoundry.source_type` +**type:**`cloudfoundry.source.type` **Description:** The CloudFoundry source type. - + | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| [`cloudfoundry.source_type`](../attributes-registry/cloudfoundry.md) | string | The type of the event source. [1] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | Recommended | +| [`cloudfoundry.source.type`](../attributes-registry/cloudfoundry.md) | string | The type of the event source. [1] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | Conditionally Required: if the the event is a log message | **[1]:** CloudFoundry generates log messages with different source types for an applications. This indicates, whether the log was created from the @@ -162,6 +162,9 @@ the CloudFoundry runtime, e.g. during a deployment. The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is also available in the syslog drain structured data as documented in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). +Application developers can access the value of the `source_type` in +the log stream generated by `cf logs `, usually in square +brackets. [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md diff --git a/model/registry/cloudfoundry.yaml b/model/registry/cloudfoundry.yaml index b921648add..c2cbcbf972 100644 --- a/model/registry/cloudfoundry.yaml +++ b/model/registry/cloudfoundry.yaml @@ -5,7 +5,7 @@ groups: brief: > CloudFoundry resource attributes. attributes: - - id: source_id + - id: source.id type: string brief: > A guid or another name describing the event source. @@ -21,12 +21,12 @@ groups: reported by `cf app --guid`. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) - should be used. The `source_id` should be set to + should be used. The `source.id` should be set to `spec.deployment/spec.name`. examples: - '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' - 'cf/gorouter' - - id: instance_id + - id: instance.id type: string brief: > An index or guid describing the concrete instance of the event source. @@ -40,7 +40,7 @@ groups: variable `CF_INSTANCE_INDEX`. When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) - should be used. The `instance_id` should be set to `spec.id`. + should be used. The `instance.id` should be set to `spec.id`. examples: - '0' - '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' @@ -98,7 +98,7 @@ groups: variable `VCAP_APPLICATION.org_id`. This is the same value as reported by `cf org --guid`. examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - - id: source_type + - id: source.type type: string brief: > The type of the event source. @@ -111,6 +111,9 @@ groups: The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). It is also available in the syslog drain structured data as documented in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). + Application developers can access the value of the `source_type` in + the log stream generated by `cf logs `, usually in square + brackets. examples: - 'APP/PROC/WEB/0' - 'APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4' diff --git a/model/resource/cloudfoundry.yaml b/model/resource/cloudfoundry.yaml index 412cdc9ad7..59fbeda4e8 100644 --- a/model/resource/cloudfoundry.yaml +++ b/model/resource/cloudfoundry.yaml @@ -5,15 +5,16 @@ groups: brief: > A CloudFoundry application or sytem component. attributes: - - ref: cloudfoundry.source_id + - ref: cloudfoundry.source.id requirement_level: required tag: generic - - ref: cloudfoundry.instance_id + - ref: cloudfoundry.instance.id requirement_level: required tag: generic - - ref: cloudfoundry.source_type - requirement_level: recommended - tag: source_type + - ref: cloudfoundry.source.type + requirement_level: + conditionally_required: if the the event is a log message + tag: source.type - id: cloudfoundry.app prefix: cloudfoundry.app type: resource From 736bee4d9593a311ae8c02b563f67fca9cd311a5 Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Sun, 11 Feb 2024 11:18:10 +0100 Subject: [PATCH 04/18] Revert "Add Changelog Entry for CloudFoundry" This reverts commit 7a9b0b43e0770fdc8739f5ae0e0f641fed4b6be0. --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9987d6a1d7..6f597bc797 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,6 @@ release. ([#615](https://github.com/open-telemetry/semantic-conventions/pull/615)) - Add an example for gcp_pubsub asynchronous batch publish ([#545](https://github.com/open-telemetry/semantic-conventions/pull/545)). -- Add a CloudFoundry convention ([#624](https://github.com/open-telemetry/semantic-conventions/pull/624)). ### Fixes From d41832ce41ddb8909b112131590f8f000b8dbb80 Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Sun, 11 Feb 2024 12:09:03 +0100 Subject: [PATCH 05/18] Provide Changelog Entry Adds changelog entry with chloggen automation. Signed-off-by: Karsten Schnitter --- .chloggen/add_cloud_foundry.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .chloggen/add_cloud_foundry.yaml diff --git a/.chloggen/add_cloud_foundry.yaml b/.chloggen/add_cloud_foundry.yaml new file mode 100644 index 0000000000..d30ce7052c --- /dev/null +++ b/.chloggen/add_cloud_foundry.yaml @@ -0,0 +1,26 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: cloudfoundry + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Adds a resource convention for Cloud Foundry applications and system components. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [622, 624] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + Introduces a description for CloudFoundry resources. These can either be + applications deployed on the runtime or system components of Cloud Foundry + itself. It also extends to the runtime logs and metrics, e.g. Gorouter access + logs and container metrics. From d20c70f205e809b6aa9bb960976a51af35969885 Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Sun, 12 May 2024 13:18:20 +0200 Subject: [PATCH 06/18] Create CloudFoundry System Namespace To resolve the disambiguity in source and instance id between applications and system components, a new namespace `cloudfoundry.system` is introduced. It will contain the system component relevant information. For applications, an instance id to contain the instance index is added. Signed-off-by: Karsten Schnitter --- ...dd_cloud_foundry.yaml => cf-resource.yaml} | 0 docs/attributes-registry/cloudfoundry.md | 78 ++++++++--------- docs/resource/cloudfoundry.md | 83 +++++++++---------- model/registry/cloudfoundry.yaml | 60 +++++++++----- model/resource/cloudfoundry.yaml | 16 ++-- 5 files changed, 126 insertions(+), 111 deletions(-) rename .chloggen/{add_cloud_foundry.yaml => cf-resource.yaml} (100%) diff --git a/.chloggen/add_cloud_foundry.yaml b/.chloggen/cf-resource.yaml similarity index 100% rename from .chloggen/add_cloud_foundry.yaml rename to .chloggen/cf-resource.yaml diff --git a/docs/attributes-registry/cloudfoundry.md b/docs/attributes-registry/cloudfoundry.md index 418fa736bb..3229ee4425 100644 --- a/docs/attributes-registry/cloudfoundry.md +++ b/docs/attributes-registry/cloudfoundry.md @@ -7,38 +7,36 @@ linkTitle: CloudFoundry ## CloudFoundry Resource Attributes -| Attribute | Type | Description | Examples | -|---|---|---|---| -| `cloudfoundry.app.id` | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | -| `cloudfoundry.app.name` | string | The name of the application. [2] | `my-app-name` | -| `cloudfoundry.instance.id` | string | An index or guid describing the concrete instance of the event source. [3] | `0`; `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | -| `cloudfoundry.org.id` | string | The guid of the CloudFoundry org the application is running in. [4] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | -| `cloudfoundry.org.name` | string | The name of the CloudFoundry organization the app is running in. [5] | `my-org-name` | -| `cloudfoundry.process.id` | string | The UID identifying the process. [6] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | -| `cloudfoundry.process.type` | string | The type of process. [7] | `web` | -| `cloudfoundry.source.id` | string | A guid or another name describing the event source. [8] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d`; `cf/gorouter` | -| `cloudfoundry.source.type` | string | The type of the event source. [9] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | -| `cloudfoundry.space.id` | string | The guid of the CloudFoundry space the application is running in. [10] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | -| `cloudfoundry.space.name` | string | The name of the CloudFoundry space the application is running in. [11] | `my-space-name` | +| Attribute | Type | Description | Examples | Stability | +|---|---|---|---|---| +| `cloudfoundry.app.id` | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.app.instance.id` | string | The index of the application instance. 0 when just one instance is active. [2] | `0`; `1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.app.name` | string | The name of the application. [3] | `my-app-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.org.id` | string | The guid of the CloudFoundry org the application is running in. [4] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.org.name` | string | The name of the CloudFoundry organization the app is running in. [5] | `my-org-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.process.id` | string | The UID identifying the process. [6] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.process.type` | string | The type of process. [7] | `web` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.source.type` | string | The type of the event source. [8] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.space.id` | string | The guid of the CloudFoundry space the application is running in. [9] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.space.name` | string | The name of the CloudFoundry space the application is running in. [10] | `my-space-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.system.id` | string | A guid or another name describing the event source. [11] | `cf/gorouter` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.system.instance.id` | string | A guid describing the concrete instance of the event source. [12] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** 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]:** Application instrumentation should use the value from environment -variable `VCAP_APPLICATION.application_name`. This is the same value -as reported by `cf apps`. - -**[3]:** CloudFoundry defines the `instance_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). +**[2]:** CloudFoundry defines the `instance_id` in the [Loggegator 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 application instance index for applications -deployed on the runtime or the vm id for CloudFoundry components. +deployed on the runtime. Application instrumentation should use the value from environment variable `CF_INSTANCE_INDEX`. -When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) -should be used. The `instance.id` should be set to `spec.id`. +**[3]:** Application instrumentation should use the value from environment +variable `VCAP_APPLICATION.application_name`. This is the same value +as reported by `cf apps`. **[4]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_id`. This is the same value as @@ -57,21 +55,7 @@ For system components, this could be the actual PID. main process will be of type `web`. There can be additional background tasks or side-cars with different process types. -**[8]:** CloudFoundry defines the `source_id` in the [Loggegator 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 application id for applications deployed on -the runtime or the component name, e.g. "gorouter", for CloudFoundry -components. - -Application instrumentation should use the value from environment -variable `VCAP_APPLICATION.application_id`. This is the same value as -reported by `cf app --guid`. - -When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) -should be used. The `source.id` should be set to -`spec.deployment/spec.name`. - -**[9]:** CloudFoundry generates log messages with different source types for an +**[8]:** CloudFoundry generates log messages with different source types for an applications. This indicates, whether the log was created from the actual application, a background task, the central load balancer, or the CloudFoundry runtime, e.g. during a deployment. @@ -83,11 +67,29 @@ Application developers can access the value of the `source_type` in the log stream generated by `cf logs `, usually in square brackets. -**[10]:** Application instrumentation should use the value from environment +**[9]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_id`. This is the same value as reported by `cf space --guid`. -**[11]:** Application instrumentation should use the value from environment +**[10]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_name`. This is the same value as reported by `cf spaces`. + +**[11]:** CloudFoundry defines the `source_id` in the [Loggegator 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`. + +**[12]:** CloudFoundry defines the `instance_id` in the [Loggegator 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`. \ No newline at end of file diff --git a/docs/resource/cloudfoundry.md b/docs/resource/cloudfoundry.md index 9708ff4af1..98db5cf5d7 100644 --- a/docs/resource/cloudfoundry.md +++ b/docs/resource/cloudfoundry.md @@ -27,10 +27,10 @@ They align with the Bosh deployment tool of CloudFoundry. **Description:** A CloudFoundry Organization -| Attribute | Type | Description | Examples | Requirement Level | -|---|---|---|---|---| -| [`cloudfoundry.org.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the CloudFoundry org the application is running in. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended | -| [`cloudfoundry.org.name`](../attributes-registry/cloudfoundry.md) | string | The name of the CloudFoundry organization the app is running in. [2] | `my-org-name` | Recommended | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`cloudfoundry.org.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the CloudFoundry org the application is running in. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cloudfoundry.org.name`](../attributes-registry/cloudfoundry.md) | string | The name of the CloudFoundry organization the app is running in. [2] | `my-org-name` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.org_id`. This is the same value as @@ -48,10 +48,10 @@ reported by `cf orgs`. **Description:** A CloudFoundry Space -| Attribute | Type | Description | Examples | Requirement Level | -|---|---|---|---|---| -| [`cloudfoundry.space.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the CloudFoundry space the application is running in. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended | -| [`cloudfoundry.space.name`](../attributes-registry/cloudfoundry.md) | string | The name of the CloudFoundry space the application is running in. [2] | `my-space-name` | Recommended | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`cloudfoundry.space.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the CloudFoundry space the application is running in. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cloudfoundry.space.name`](../attributes-registry/cloudfoundry.md) | string | The name of the CloudFoundry space the application is running in. [2] | `my-space-name` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_id`. This is the same value as @@ -69,10 +69,10 @@ reported by `cf spaces`. **Description:** A CloudFoundry Application -| Attribute | Type | Description | Examples | Requirement Level | -|---|---|---|---|---| -| [`cloudfoundry.app.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended | -| [`cloudfoundry.app.name`](../attributes-registry/cloudfoundry.md) | string | The name of the application. [2] | `my-app-name` | Recommended | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`cloudfoundry.app.id`](../attributes-registry/cloudfoundry.md) | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cloudfoundry.app.name`](../attributes-registry/cloudfoundry.md) | string | The name of the application. [2] | `my-app-name` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.application_id`. This is the same value as @@ -90,10 +90,10 @@ as reported by `cf apps`. **Description:** A CloudFoundry Application Process -| Attribute | Type | Description | Examples | Requirement Level | -|---|---|---|---|---| -| [`cloudfoundry.process.id`](../attributes-registry/cloudfoundry.md) | string | The UID identifying the process. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Recommended | -| [`cloudfoundry.process.type`](../attributes-registry/cloudfoundry.md) | string | The type of process. [2] | `web` | Recommended | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`cloudfoundry.process.id`](../attributes-registry/cloudfoundry.md) | string | The UID identifying the process. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cloudfoundry.process.type`](../attributes-registry/cloudfoundry.md) | string | The type of process. [2] | `web` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to @@ -105,42 +105,35 @@ main process will be of type `web`. There can be additional background tasks or side-cars with different process types. -## Generic Source +## Cloud Foundry System Component **type:** `cloudfoundry` -**Description:** The generic source (app or system component) +**Description:** A CloudFoundry system component, i.e. parts of the runtime. - -| Attribute | Type | Description | Examples | Requirement Level | -|---|---|---|---|---| -| [`cloudfoundry.instance.id`](../attributes-registry/cloudfoundry.md) | string | An index or guid describing the concrete instance of the event source. [1] | `0`; `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | Required | -| [`cloudfoundry.source.id`](../attributes-registry/cloudfoundry.md) | string | A guid or another name describing the event source. [2] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d`; `cf/gorouter` | Required | + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`cloudfoundry.system.id`](../attributes-registry/cloudfoundry.md) | string | A guid or another name describing the event source. [1] | `cf/gorouter` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cloudfoundry.system.instance.id`](../attributes-registry/cloudfoundry.md) | string | A guid describing the concrete instance of the event source. [2] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** CloudFoundry defines the `instance_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). +**[1]:** CloudFoundry defines the `source_id` in the [Loggegator 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 application instance index for applications -deployed on the runtime or the vm id for CloudFoundry components. +supposed to contain the component name, e.g. "gorouter", for +CloudFoundry components. -Application instrumentation should use the value from environment -variable `CF_INSTANCE_INDEX`. - -When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) -should be used. The `instance.id` should be set to `spec.id`. +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`. -**[2]:** CloudFoundry defines the `source_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). +**[2]:** CloudFoundry defines the `instance_id` in the [Loggegator 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 application id for applications deployed on -the runtime or the component name, e.g. "gorouter", for CloudFoundry -components. - -Application instrumentation should use the value from environment -variable `VCAP_APPLICATION.application_id`. This is the same value as -reported by `cf app --guid`. +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 `source.id` should be set to -`spec.deployment/spec.name`. +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`. ## Source Type @@ -150,9 +143,9 @@ should be used. The `source.id` should be set to **Description:** The CloudFoundry source type. -| Attribute | Type | Description | Examples | Requirement Level | -|---|---|---|---|---| -| [`cloudfoundry.source.type`](../attributes-registry/cloudfoundry.md) | string | The type of the event source. [1] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | Conditionally Required: if the the event is a log message | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`cloudfoundry.source.type`](../attributes-registry/cloudfoundry.md) | string | The type of the event source. [1] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | `Conditionally Required` if the the event is a log message | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** CloudFoundry generates log messages with different source types for an applications. This indicates, whether the log was created from the diff --git a/model/registry/cloudfoundry.yaml b/model/registry/cloudfoundry.yaml index c2cbcbf972..48df4f66c0 100644 --- a/model/registry/cloudfoundry.yaml +++ b/model/registry/cloudfoundry.yaml @@ -5,47 +5,41 @@ groups: brief: > CloudFoundry resource attributes. attributes: - - id: source.id + - id: system.id type: string + stability: experimental brief: > A guid or another name describing the event source. note: | CloudFoundry defines the `source_id` in the [Loggegator 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 application id for applications deployed on - the runtime or the component name, e.g. "gorouter", for CloudFoundry - components. + supposed to contain the component name, e.g. "gorouter", for + CloudFoundry components. - Application instrumentation should use the value from environment - variable `VCAP_APPLICATION.application_id`. This is the same value as - reported by `cf app --guid`. - - When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) - should be used. The `source.id` should be set to + 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`. examples: - - '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' - 'cf/gorouter' - - id: instance.id + - id: system.instance.id type: string + stability: experimental brief: > - An index or guid describing the concrete instance of the event source. + A guid describing the concrete instance of the event source. note: | CloudFoundry defines the `instance_id` in the [Loggegator 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 application instance index for applications - deployed on the runtime or the vm id for CloudFoundry components. + supposed to contain the vm id for CloudFoundry components. - Application instrumentation should use the value from environment - variable `CF_INSTANCE_INDEX`. - - When system components are instrumented, values from the [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) - should be used. The `instance.id` should be set to `spec.id`. + 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`. examples: - - '0' - '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' - id: app.name type: string + stability: experimental brief: > The name of the application. note: | @@ -55,6 +49,7 @@ groups: examples: ['my-app-name'] - id: app.id type: string + stability: experimental brief: > The guid of the application. note: | @@ -62,8 +57,25 @@ groups: variable `VCAP_APPLICATION.application_id`. This is the same value as reported by `cf app --guid`. examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] + - id: app.instance.id + type: string + stability: experimental + brief: > + The index of the application instance. 0 when just one instance is active. + note: | + CloudFoundry defines the `instance_id` in the [Loggegator 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 application instance index for applications + deployed on the runtime. + + Application instrumentation should use the value from environment + variable `CF_INSTANCE_INDEX`. + examples: + - '0' + - '1' - id: space.name type: string + stability: experimental brief: > The name of the CloudFoundry space the application is running in. note: | @@ -73,6 +85,7 @@ groups: examples: ['my-space-name'] - id: space.id type: string + stability: experimental brief: > The guid of the CloudFoundry space the application is running in. note: | @@ -82,6 +95,7 @@ groups: examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - id: org.name type: string + stability: experimental brief: > The name of the CloudFoundry organization the app is running in. note: | @@ -91,6 +105,7 @@ groups: examples: ['my-org-name'] - id: org.id type: string + stability: experimental brief: > The guid of the CloudFoundry org the application is running in. note: | @@ -100,6 +115,7 @@ groups: examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - id: source.type type: string + stability: experimental brief: > The type of the event source. note: | @@ -121,6 +137,7 @@ groups: - 'STG' - id: process.id type: string + stability: experimental brief: > The UID identifying the process. note: | @@ -131,6 +148,7 @@ groups: examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - id: process.type type: string + stability: experimental brief: > The type of process. note: | diff --git a/model/resource/cloudfoundry.yaml b/model/resource/cloudfoundry.yaml index 59fbeda4e8..3bdfda7e8d 100644 --- a/model/resource/cloudfoundry.yaml +++ b/model/resource/cloudfoundry.yaml @@ -3,18 +3,20 @@ groups: prefix: cloudfoundry type: resource brief: > - A CloudFoundry application or sytem component. + A CloudFoundry application or system component. attributes: - - ref: cloudfoundry.source.id - requirement_level: required - tag: generic - - ref: cloudfoundry.instance.id - requirement_level: required - tag: generic - ref: cloudfoundry.source.type requirement_level: conditionally_required: if the the event is a log message tag: source.type + - id: cloudfoundry.system + prefix: cloudfoundry.system + type: resource + brief: > + The system component which is monitored. + attributes: + - ref: cloudfoundry.system.id + - ref: cloudfoundry.system.instance.id - id: cloudfoundry.app prefix: cloudfoundry.app type: resource From 99a037d62b9f30a49686cfd1a0b5ab62fa8808ad Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Sun, 26 May 2024 12:18:34 +0200 Subject: [PATCH 07/18] Update docs/attributes-registry/README.md Co-authored-by: Liudmila Molkova --- docs/attributes-registry/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 0fc17149f6..2ffa42fe11 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -38,7 +38,7 @@ Currently, the following namespaces exist: - [Client](client.md) - [Cloud](cloud.md) - [CloudEvents](cloudevents.md) -- [Cloudfoundry](cloudfoundry.md) +- [CloudFoundry](cloudfoundry.md) - [Code](code.md) - [Container](container.md) - [Db](db.md) From ad85e02d96c395d5f1504d9322e2461872d18b1d Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Mon, 9 Sep 2024 09:22:26 +0200 Subject: [PATCH 08/18] Update issue templates result of running `make generate-gh-issue-templates` Signed-off-by: Karsten Schnitter --- .github/ISSUE_TEMPLATE/bug_report.yaml | 1 + .github/ISSUE_TEMPLATE/change_proposal.yaml | 1 + .github/ISSUE_TEMPLATE/new-conventions.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index e808ec4b1e..1806626fb9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -30,6 +30,7 @@ body: - area:client - area:cloud - area:cloudevents + - area:cloudfoundry - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 6717c98fba..2cbc6c5f0f 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -22,6 +22,7 @@ body: - area:client - area:cloud - area:cloudevents + - area:cloudfoundry - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 5df4d54de4..77b3cf046e 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -31,6 +31,7 @@ body: - area:client - area:cloud - area:cloudevents + - area:cloudfoundry - area:code - area:container - area:cpu From 5da2eac2ac5f240793256c83f75b1b02347a9b87 Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Mon, 9 Sep 2024 09:23:42 +0200 Subject: [PATCH 09/18] Remove prefix Adjust model registry for CloudFoundry to not use prefixes but fully qualified ids. Signed-off-by: Karsten Schnitter --- model/registry/cloudfoundry.yaml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/model/registry/cloudfoundry.yaml b/model/registry/cloudfoundry.yaml index 450d0b452a..21bb3cea55 100644 --- a/model/registry/cloudfoundry.yaml +++ b/model/registry/cloudfoundry.yaml @@ -1,11 +1,10 @@ groups: - id: registry.cloudfoundry - prefix: cloudfoundry type: attribute_group brief: > CloudFoundry resource attributes. attributes: - - id: system.id + - id: cloudfoundry.system.id type: string stability: experimental brief: > @@ -22,7 +21,7 @@ groups: `spec.deployment/spec.name`. examples: - 'cf/gorouter' - - id: system.instance.id + - id: cloudfoundry.system.instance.id type: string stability: experimental brief: > @@ -37,7 +36,7 @@ groups: should be used. The `system.instance.id` should be set to `spec.id`. examples: - '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' - - id: app.name + - id: cloudfoundry.app.name type: string stability: experimental brief: > @@ -47,7 +46,7 @@ groups: variable `VCAP_APPLICATION.application_name`. This is the same value as reported by `cf apps`. examples: ['my-app-name'] - - id: app.id + - id: cloudfoundry.app.id type: string stability: experimental brief: > @@ -57,7 +56,7 @@ groups: variable `VCAP_APPLICATION.application_id`. This is the same value as reported by `cf app --guid`. examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - - id: app.instance.id + - id: cloudfoundry.app.instance.id type: string stability: experimental brief: > @@ -73,7 +72,7 @@ groups: examples: - '0' - '1' - - id: space.name + - id: cloudfoundry.space.name type: string stability: experimental brief: > @@ -83,7 +82,7 @@ groups: variable `VCAP_APPLICATION.space_name`. This is the same value as reported by `cf spaces`. examples: ['my-space-name'] - - id: space.id + - id: cloudfoundry.space.id type: string stability: experimental brief: > @@ -93,7 +92,7 @@ groups: variable `VCAP_APPLICATION.space_id`. This is the same value as reported by `cf space --guid`. examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - - id: org.name + - id: cloudfoundry.org.name type: string stability: experimental brief: > @@ -103,7 +102,7 @@ groups: variable `VCAP_APPLICATION.org_name`. This is the same value as reported by `cf orgs`. examples: ['my-org-name'] - - id: org.id + - id: cloudfoundry.org.id type: string stability: experimental brief: > @@ -113,7 +112,7 @@ groups: variable `VCAP_APPLICATION.org_id`. This is the same value as reported by `cf org --guid`. examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - - id: source.type + - id: cloudfoundry.source.type type: string stability: experimental brief: > @@ -135,7 +134,7 @@ groups: - 'APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4' - 'RTR' - 'STG' - - id: process.id + - id: cloudfoundry.process.id type: string stability: experimental brief: > @@ -146,7 +145,7 @@ groups: `VCAP_APPLICATION.app_id` for applications deployed to the runtime. For system components, this could be the actual PID. examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - - id: process.type + - id: cloudfoundry.process.type type: string stability: experimental brief: > From 887ade058e5a92132f7a1b0be21d737bbf2eec5e Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Mon, 9 Sep 2024 09:58:30 +0200 Subject: [PATCH 10/18] Register CloudFoundry as acronym Avoids misspelling of CloudFoundry during content generation. Signed-off-by: Karsten Schnitter --- docs/attributes-registry/cloudfoundry.md | 4 ++-- templates/registry/markdown/weaver.yaml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/attributes-registry/cloudfoundry.md b/docs/attributes-registry/cloudfoundry.md index f83edcc83f..42645ebd6e 100644 --- a/docs/attributes-registry/cloudfoundry.md +++ b/docs/attributes-registry/cloudfoundry.md @@ -4,9 +4,9 @@ -# Cloudfoundry +# CloudFoundry -## Cloudfoundry Attributes +## CloudFoundry Attributes CloudFoundry resource attributes. diff --git a/templates/registry/markdown/weaver.yaml b/templates/registry/markdown/weaver.yaml index 0570d9f9f2..cf56f8cb28 100644 --- a/templates/registry/markdown/weaver.yaml +++ b/templates/registry/markdown/weaver.yaml @@ -11,6 +11,7 @@ acronyms: - AWS - CICD - CloudEvents + - CloudFoundry - CLR - CPU - DynamoDB From 2313a5474da161be7cd202478aab90a5ca5e88dc Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Mon, 9 Sep 2024 10:07:24 +0200 Subject: [PATCH 11/18] Fix issue templates Regenerated templates for proper order. Signed-off-by: Karsten Schnitter --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/change_proposal.yaml | 2 +- .github/ISSUE_TEMPLATE/new-conventions.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 1806626fb9..531d12913a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -28,9 +28,9 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents - area:cloudfoundry + - area:cloud - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 2cbc6c5f0f..02a8fedbdf 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -20,9 +20,9 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents - area:cloudfoundry + - area:cloud - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 77b3cf046e..85e219f946 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -29,9 +29,9 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents - area:cloudfoundry + - area:cloud - area:code - area:container - area:cpu From fe5afa00466386178b526d86c6e7121bd7973589 Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Mon, 9 Sep 2024 10:40:09 +0200 Subject: [PATCH 12/18] Fix resource model Removes prefixes from CloudFoundry groups. Signed-off-by: Karsten Schnitter --- model/resource/cloudfoundry.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/model/resource/cloudfoundry.yaml b/model/resource/cloudfoundry.yaml index 3bdfda7e8d..aed845f9a7 100644 --- a/model/resource/cloudfoundry.yaml +++ b/model/resource/cloudfoundry.yaml @@ -1,6 +1,5 @@ groups: - id: cloudfoundry - prefix: cloudfoundry type: resource brief: > A CloudFoundry application or system component. @@ -10,7 +9,6 @@ groups: conditionally_required: if the the event is a log message tag: source.type - id: cloudfoundry.system - prefix: cloudfoundry.system type: resource brief: > The system component which is monitored. @@ -18,7 +16,6 @@ groups: - ref: cloudfoundry.system.id - ref: cloudfoundry.system.instance.id - id: cloudfoundry.app - prefix: cloudfoundry.app type: resource brief: > The application which is monitored. @@ -26,7 +23,6 @@ groups: - ref: cloudfoundry.app.id - ref: cloudfoundry.app.name - id: cloudfoundry.space - prefix: cloudfoundry.space type: resource brief: > The space of the application which is monitored. @@ -34,7 +30,6 @@ groups: - ref: cloudfoundry.space.id - ref: cloudfoundry.space.name - id: cloudfoundry.org - prefix: cloudfoundry.org type: resource brief: > The organization of the application which is monitored. @@ -42,7 +37,6 @@ groups: - ref: cloudfoundry.org.id - ref: cloudfoundry.org.name - id: cloudfoundry.process - prefix: cloudfoundry.process type: resource brief: > The process of the application which is monitored. From 2f991a8debe725288cfd908921dd2266bf3137ed Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Tue, 17 Sep 2024 10:07:20 +0000 Subject: [PATCH 13/18] Fix CloudFoundry Model Configuration Moves resource and registry yaml to cloudfoundry directory. Add attribute names. Signed-off-by: Karsten Schnitter --- docs/resource/cloudfoundry.md | 35 +++++++++++++++++++ .../registry.yaml} | 0 .../resources.yaml} | 6 ++++ 3 files changed, 41 insertions(+) rename model/{registry/cloudfoundry.yaml => cloudfoundry/registry.yaml} (100%) rename model/{resource/cloudfoundry.yaml => cloudfoundry/resources.yaml} (88%) diff --git a/docs/resource/cloudfoundry.md b/docs/resource/cloudfoundry.md index 8a40c5e9b7..e8337f9bdb 100644 --- a/docs/resource/cloudfoundry.md +++ b/docs/resource/cloudfoundry.md @@ -33,6 +33,13 @@ They align with the Bosh deployment tool of CloudFoundry. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `cloudfoundry.org` + +**Description:** The organization of the application which is monitored. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.org.id`](/docs/attributes-registry/cloudfoundry.md) | string | The guid of the CloudFoundry org the application is running in. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -67,6 +74,13 @@ reported by `cf orgs`. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `cloudfoundry.space` + +**Description:** The space of the application which is monitored. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.space.id`](/docs/attributes-registry/cloudfoundry.md) | string | The guid of the CloudFoundry space the application is running in. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -101,6 +115,13 @@ reported by `cf spaces`. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `cloudfoundry.app` + +**Description:** The application which is monitored. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.app.id`](/docs/attributes-registry/cloudfoundry.md) | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -135,6 +156,13 @@ as reported by `cf apps`. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `cloudfoundry.process` + +**Description:** The process of the application which is monitored. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.process.id`](/docs/attributes-registry/cloudfoundry.md) | string | The UID identifying the process. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -170,6 +198,13 @@ tasks or side-cars with different process types. + +**Status:** ![Experimental](https://img.shields.io/badge/-experimental-blue) + +**type:** `cloudfoundry.system` + +**Description:** The system component which is monitored. + | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`cloudfoundry.system.id`](/docs/attributes-registry/cloudfoundry.md) | string | A guid or another name describing the event source. [1] | `cf/gorouter` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/registry/cloudfoundry.yaml b/model/cloudfoundry/registry.yaml similarity index 100% rename from model/registry/cloudfoundry.yaml rename to model/cloudfoundry/registry.yaml diff --git a/model/resource/cloudfoundry.yaml b/model/cloudfoundry/resources.yaml similarity index 88% rename from model/resource/cloudfoundry.yaml rename to model/cloudfoundry/resources.yaml index aed845f9a7..08eefdedbe 100644 --- a/model/resource/cloudfoundry.yaml +++ b/model/cloudfoundry/resources.yaml @@ -1,6 +1,7 @@ groups: - id: cloudfoundry type: resource + name: cloudfoundry brief: > A CloudFoundry application or system component. attributes: @@ -10,6 +11,7 @@ groups: tag: source.type - id: cloudfoundry.system type: resource + name: cloudfoundry.system brief: > The system component which is monitored. attributes: @@ -17,6 +19,7 @@ groups: - ref: cloudfoundry.system.instance.id - id: cloudfoundry.app type: resource + name: cloudfoundry.app brief: > The application which is monitored. attributes: @@ -24,6 +27,7 @@ groups: - ref: cloudfoundry.app.name - id: cloudfoundry.space type: resource + name: cloudfoundry.space brief: > The space of the application which is monitored. attributes: @@ -31,6 +35,7 @@ groups: - ref: cloudfoundry.space.name - id: cloudfoundry.org type: resource + name: cloudfoundry.org brief: > The organization of the application which is monitored. attributes: @@ -38,6 +43,7 @@ groups: - ref: cloudfoundry.org.name - id: cloudfoundry.process type: resource + name: cloudfoundry.process brief: > The process of the application which is monitored. attributes: From ed7ff7a5217b1a846f1fe82565ea8386227be82a Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Tue, 17 Sep 2024 10:22:01 +0000 Subject: [PATCH 14/18] Ajdust Github Issue Templates result of `make generate-gh-issue-templates` Signed-off-by: Karsten Schnitter --- .github/ISSUE_TEMPLATE/bug_report.yaml | 3 +-- .github/ISSUE_TEMPLATE/change_proposal.yaml | 3 +-- .github/ISSUE_TEMPLATE/new-conventions.yaml | 3 +-- Makefile | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 1cff7b210d..e4e6d6b430 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -28,10 +28,9 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - - area:cloudfoundry - area:cloud - area:cloudevents + - area:cloudfoundry - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 982ee353f0..4c9316ddf1 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -20,10 +20,9 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - - area:cloudfoundry - area:cloud - area:cloudevents + - area:cloudfoundry - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 5d20983ac1..e6e543158e 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -29,10 +29,9 @@ body: - area:browser - area:cicd - area:client - - area:cloudevents - - area:cloudfoundry - area:cloud - area:cloudevents + - area:cloudfoundry - area:code - area:container - area:cpu diff --git a/Makefile b/Makefile index 3f9eba31c4..680baa7fda 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ else SED := sed endif -TOOLS_DIR := ./internal/tools +TOOLS_DIR := $(PWD)/internal/tools MISSPELL_BINARY=bin/misspell MISSPELL = $(TOOLS_DIR)/$(MISSPELL_BINARY) From 643181a791321aaad856432b45500819b3c88900 Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Tue, 24 Sep 2024 21:55:00 +0200 Subject: [PATCH 15/18] Apply suggestions from code review Co-authored-by: Liudmila Molkova --- model/cloudfoundry/registry.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/cloudfoundry/registry.yaml b/model/cloudfoundry/registry.yaml index 21bb3cea55..d32bb99701 100644 --- a/model/cloudfoundry/registry.yaml +++ b/model/cloudfoundry/registry.yaml @@ -10,7 +10,7 @@ groups: brief: > A guid or another name describing the event source. note: | - CloudFoundry defines the `source_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). + 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. @@ -27,7 +27,7 @@ groups: brief: > A guid describing the concrete instance of the event source. note: | - CloudFoundry defines the `instance_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). + 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. From 5f518c4405779bd99a45fc8b224d85625bdcae2b Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Tue, 24 Sep 2024 20:40:29 +0000 Subject: [PATCH 16/18] Remove source.type Discussion showed, that the CloudFoundry resource type is not a good candidate for an OpenTelemetry resource attribute. It can be added as a log attribute at a later point in time. Signed-off-by: Karsten Schnitter --- docs/attributes-registry/cloudfoundry.md | 47 +++++++++--------------- model/cloudfoundry/registry.yaml | 22 ----------- model/cloudfoundry/resources.yaml | 10 ----- 3 files changed, 17 insertions(+), 62 deletions(-) diff --git a/docs/attributes-registry/cloudfoundry.md b/docs/attributes-registry/cloudfoundry.md index 42645ebd6e..26074805e8 100644 --- a/docs/attributes-registry/cloudfoundry.md +++ b/docs/attributes-registry/cloudfoundry.md @@ -10,20 +10,19 @@ CloudFoundry resource attributes. -| Attribute | Type | Description | Examples | Stability | -| --------------------------------- | ------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -| `cloudfoundry.app.id` | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.app.instance.id` | string | The index of the application instance. 0 when just one instance is active. [2] | `0`; `1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.app.name` | string | The name of the application. [3] | `my-app-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.org.id` | string | The guid of the CloudFoundry org the application is running in. [4] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.org.name` | string | The name of the CloudFoundry organization the app is running in. [5] | `my-org-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.process.id` | string | The UID identifying the process. [6] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.process.type` | string | The type of process. [7] | `web` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.source.type` | string | The type of the event source. [8] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.space.id` | string | The guid of the CloudFoundry space the application is running in. [9] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.space.name` | string | The name of the CloudFoundry space the application is running in. [10] | `my-space-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.system.id` | string | A guid or another name describing the event source. [11] | `cf/gorouter` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cloudfoundry.system.instance.id` | string | A guid describing the concrete instance of the event source. [12] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| Attribute | Type | Description | Examples | Stability | +| --------------------------------- | ------ | ------------------------------------------------------------------------------ | -------------------------------------- | ---------------------------------------------------------------- | +| `cloudfoundry.app.id` | string | The guid of the application. [1] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.app.instance.id` | string | The index of the application instance. 0 when just one instance is active. [2] | `0`; `1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.app.name` | string | The name of the application. [3] | `my-app-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.org.id` | string | The guid of the CloudFoundry org the application is running in. [4] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.org.name` | string | The name of the CloudFoundry organization the app is running in. [5] | `my-org-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.process.id` | string | The UID identifying the process. [6] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.process.type` | string | The type of process. [7] | `web` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.space.id` | string | The guid of the CloudFoundry space the application is running in. [8] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.space.name` | string | The name of the CloudFoundry space the application is running in. [9] | `my-space-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.system.id` | string | A guid or another name describing the event source. [10] | `cf/gorouter` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cloudfoundry.system.instance.id` | string | A guid describing the concrete instance of the event source. [11] | `218fc5a9-a5f1-4b54-aa05-46717d0ab26d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | **[1]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.application_id`. This is the same value as @@ -58,27 +57,15 @@ For system components, this could be the actual PID. main process will be of type `web`. There can be additional background tasks or side-cars with different process types. -**[8]:** CloudFoundry generates log messages with different source types for an -applications. This indicates, whether the log was created from the -actual application, a background task, the central load balancer, or -the CloudFoundry runtime, e.g. during a deployment. - -The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). -It is also available in the syslog drain structured data as documented -in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). -Application developers can access the value of the `source_type` in -the log stream generated by `cf logs `, usually in square -brackets. - -**[9]:** Application instrumentation should use the value from environment +**[8]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_id`. This is the same value as reported by `cf space --guid`. -**[10]:** Application instrumentation should use the value from environment +**[9]:** Application instrumentation should use the value from environment variable `VCAP_APPLICATION.space_name`. This is the same value as reported by `cf spaces`. -**[11]:** CloudFoundry defines the `source_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). +**[10]:** 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. @@ -88,7 +75,7 @@ When system components are instrumented, values from the should be used. The `system.id` should be set to `spec.deployment/spec.name`. -**[12]:** CloudFoundry defines the `instance_id` in the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). +**[11]:** 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. diff --git a/model/cloudfoundry/registry.yaml b/model/cloudfoundry/registry.yaml index d32bb99701..c360d69335 100644 --- a/model/cloudfoundry/registry.yaml +++ b/model/cloudfoundry/registry.yaml @@ -112,28 +112,6 @@ groups: variable `VCAP_APPLICATION.org_id`. This is the same value as reported by `cf org --guid`. examples: ['218fc5a9-a5f1-4b54-aa05-46717d0ab26d'] - - id: cloudfoundry.source.type - type: string - stability: experimental - brief: > - The type of the event source. - note: | - CloudFoundry generates log messages with different source types for an - applications. This indicates, whether the log was created from the - actual application, a background task, the central load balancer, or - the CloudFoundry runtime, e.g. during a deployment. - - The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). - It is also available in the syslog drain structured data as documented - in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). - Application developers can access the value of the `source_type` in - the log stream generated by `cf logs `, usually in square - brackets. - examples: - - 'APP/PROC/WEB/0' - - 'APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4' - - 'RTR' - - 'STG' - id: cloudfoundry.process.id type: string stability: experimental diff --git a/model/cloudfoundry/resources.yaml b/model/cloudfoundry/resources.yaml index 08eefdedbe..95d60abe35 100644 --- a/model/cloudfoundry/resources.yaml +++ b/model/cloudfoundry/resources.yaml @@ -1,14 +1,4 @@ groups: - - id: cloudfoundry - type: resource - name: cloudfoundry - brief: > - A CloudFoundry application or system component. - attributes: - - ref: cloudfoundry.source.type - requirement_level: - conditionally_required: if the the event is a log message - tag: source.type - id: cloudfoundry.system type: resource name: cloudfoundry.system From 4cb1d4ef12cf6d7a56de35612ec7f4483b1fcb2e Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Tue, 24 Sep 2024 23:27:31 +0200 Subject: [PATCH 17/18] Apply suggestions from code review Co-authored-by: Liudmila Molkova --- docs/resource/cloudfoundry.md | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/docs/resource/cloudfoundry.md b/docs/resource/cloudfoundry.md index e8337f9bdb..b2dfb74815 100644 --- a/docs/resource/cloudfoundry.md +++ b/docs/resource/cloudfoundry.md @@ -22,10 +22,6 @@ They align with the Bosh deployment tool of CloudFoundry. ## Organization -**type:** `cloudfoundry.org` - -**Description:** A CloudFoundry Organization - @@ -63,10 +59,6 @@ reported by `cf orgs`. ## Space -**type:** `cloudfoundry.space` - -**Description:** A CloudFoundry Space - @@ -104,10 +96,6 @@ reported by `cf spaces`. ## Application -***type:** `cloudfoundry.app` - -**Description:** A CloudFoundry Application - @@ -145,9 +133,6 @@ as reported by `cf apps`. ## Process -**type:** `cloudfoundry.process` - -**Description:** A CloudFoundry Application Process @@ -187,9 +172,6 @@ tasks or side-cars with different process types. ## Cloud Foundry System Component -**type:** `cloudfoundry` - -**Description:** A CloudFoundry system component, i.e. parts of the runtime. @@ -260,4 +242,4 @@ the log stream generated by `cf logs `, usually in square brackets. -[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md +[DocumentStatus]: [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status From 1e339c5503557d23a989f44d556945abef1205a6 Mon Sep 17 00:00:00 2001 From: Karsten Schnitter Date: Wed, 25 Sep 2024 04:05:01 +0000 Subject: [PATCH 18/18] Remove source.type from table template Fix markdown template after removal of `source.type`. Signed-off-by: Karsten Schnitter --- docs/resource/cloudfoundry.md | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/docs/resource/cloudfoundry.md b/docs/resource/cloudfoundry.md index b2dfb74815..a6cd9f241b 100644 --- a/docs/resource/cloudfoundry.md +++ b/docs/resource/cloudfoundry.md @@ -133,7 +133,6 @@ as reported by `cf apps`. ## Process - @@ -172,7 +171,6 @@ tasks or side-cars with different process types. ## Cloud Foundry System Component - @@ -218,28 +216,4 @@ should be used. The `system.instance.id` should be set to `spec.id`. -## Source Type - -**type:**`cloudfoundry.source.type` - -**Description:** The CloudFoundry source type. - - -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | -|---|---|---|---|---|---| -| [`cloudfoundry.source.type`](../attributes-registry/cloudfoundry.md) | string | The type of the event source. [1] | `APP/PROC/WEB/0`; `APP/TASK/jobscheduler-task-70013817-ab92-4f75-82d4-de8ae4dd64b4`; `RTR`; `STG` | `Conditionally Required` if the the event is a log message | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - -**[1]:** CloudFoundry generates log messages with different source types for an -applications. This indicates, whether the log was created from the -actual application, a background task, the central load balancer, or -the CloudFoundry runtime, e.g. during a deployment. - -The `source_type` is contained as a tag of the [Loggegator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). -It is also available in the syslog drain structured data as documented -in the [CloudFoundry Dev Guide](https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html). -Application developers can access the value of the `source_type` in -the log stream generated by `cf logs `, usually in square -brackets. - - -[DocumentStatus]: [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status +[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md