diff --git a/.chloggen/gcp-apphub.yaml b/.chloggen/gcp-apphub.yaml new file mode 100755 index 0000000000..dc8cf5bc8a --- /dev/null +++ b/.chloggen/gcp-apphub.yaml @@ -0,0 +1,22 @@ +# 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: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: gcp + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Adds GCP AppHub labels for resource. + +# 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: [2006] + +# (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: diff --git a/docs/attributes-registry/gcp.md b/docs/attributes-registry/gcp.md index 090cfb0940..c5a7649bc6 100644 --- a/docs/attributes-registry/gcp.md +++ b/docs/attributes-registry/gcp.md @@ -3,19 +3,88 @@ # GCP +- [GCP - AppHub Attributes](#gcp---apphub-attributes) - [GCP Client Attributes](#gcp-client-attributes) - [GCP - Google Cloud Run Attributes](#gcp---google-cloud-run-attributes) - [GCP - Google Compute Engine (GCE) Attributes](#gcp---google-compute-engine-gce-attributes) +## GCP - AppHub Attributes + +This document defines attributes AppHub will apply to resources in GCP. See [AppHub overview](https://cloud.google.com/app-hub/docs/overview). + +| Attribute | Type | Description | Examples | Stability | +|---|---|---|---|---| +| `gcp.apphub.application.container` | string | The container within GCP where the AppHub application is defined. | `projects/my-container-project` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.apphub.application.id` | string | The name of the application as configured in AppHub. | `my-application` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.apphub.application.location` | string | The GCP zone or region where the application is defined. | `us-central1` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.apphub.service.criticality_type` | string | Criticality of a service indicates its importance to the business. [1] | `MISSION_CRITICAL`; `HIGH`; `MEDIUM` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.apphub.service.environment_type` | string | Environment of a service is the stage of a software lifecycle. [2] | `PRODUCTION`; `STAGING`; `TEST` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.apphub.service.id` | string | The name of the service as configured in AppHub. | `my-service` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.apphub.workload.criticality_type` | string | Criticality of a workload indicates its importance to the business. [3] | `MISSION_CRITICAL`; `HIGH`; `MEDIUM` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.apphub.workload.environment_type` | string | Environment of a workload is the stage of a software lifecycle. [4] | `PRODUCTION`; `STAGING`; `TEST` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.apphub.workload.id` | string | The name of the workload as configured in AppHub. | `my-workload` | ![Development](https://img.shields.io/badge/-development-blue) | + +**[1] `gcp.apphub.service.criticality_type`:** [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type) + +**[2] `gcp.apphub.service.environment_type`:** [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type_1) + +**[3] `gcp.apphub.workload.criticality_type`:** [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type) + +**[4] `gcp.apphub.workload.environment_type`:** [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type_1) + +--- + +`gcp.apphub.service.criticality_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `HIGH` | High impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `LOW` | Low impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `MEDIUM` | Medium impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `MISSION_CRITICAL` | Mission critical service. | ![Development](https://img.shields.io/badge/-development-blue) | + +--- + +`gcp.apphub.service.environment_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `DEVELOPMENT` | Development environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `PRODUCTION` | Production environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `STAGING` | Staging environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `TEST` | Test environment. | ![Development](https://img.shields.io/badge/-development-blue) | + +--- + +`gcp.apphub.workload.criticality_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `HIGH` | High impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `LOW` | Low impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `MEDIUM` | Medium impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `MISSION_CRITICAL` | Mission critical service. | ![Development](https://img.shields.io/badge/-development-blue) | + +--- + +`gcp.apphub.workload.environment_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `DEVELOPMENT` | Development environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `PRODUCTION` | Production environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `STAGING` | Staging environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `TEST` | Test environment. | ![Development](https://img.shields.io/badge/-development-blue) | + ## GCP Client Attributes Attributes for Google Cloud client libraries. | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| -| `gcp.client.service` | string | Identifies the Google Cloud service for which the official client library is intended. [1] | `appengine`; `run`; `firestore`; `alloydb`; `spanner` | ![Development](https://img.shields.io/badge/-development-blue) | +| `gcp.client.service` | string | Identifies the Google Cloud service for which the official client library is intended. [5] | `appengine`; `run`; `firestore`; `alloydb`; `spanner` | ![Development](https://img.shields.io/badge/-development-blue) | -**[1] `gcp.client.service`:** Intended to be a stable identifier for Google Cloud client libraries that is uniform across implementation languages. The value should be derived from the canonical service domain for the service; for example, 'foo.googleapis.com' should result in a value of 'foo'. +**[5] `gcp.client.service`:** Intended to be a stable identifier for Google Cloud client libraries that is uniform across implementation languages. The value should be derived from the canonical service domain for the service; for example, 'foo.googleapis.com' should result in a value of 'foo'. ## GCP - Google Cloud Run Attributes diff --git a/docs/resource/cloud-provider/gcp/README.md b/docs/resource/cloud-provider/gcp/README.md index 1e8310dac9..f071434386 100644 --- a/docs/resource/cloud-provider/gcp/README.md +++ b/docs/resource/cloud-provider/gcp/README.md @@ -15,5 +15,6 @@ provider (like account ID, operating system, etc), it belongs in the parent - [Cloud Run](./cloud-run.md) - [Compute Engine](./gce.md) +- [AppHub](./apphub.md) [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/resource/cloud-provider/gcp/apphub.md b/docs/resource/cloud-provider/gcp/apphub.md new file mode 100644 index 0000000000..0056f84ded --- /dev/null +++ b/docs/resource/cloud-provider/gcp/apphub.md @@ -0,0 +1,146 @@ +# Google Cloud AppHub + +**Status**: [Development][DocumentStatus] + +These conventions are used by Google Cloud when using [AppHub](https://cloud.google.com/app-hub/docs/overview). Observability +data from Google Cloud will be annotated with these resource types, depending +on the source of telemetry. For example, metrics coming from a Google Cloud +service will be annotated with the appropriate `gcp.apphub.application` and +`gcp.apphub.service` as configured in AppHub. + +See [Supported Resources](https://cloud.google.com/app-hub/docs/supported-resources) for what data will be annotated by Google Cloud. + +## Application + + + + + + + + + +**Status:** ![Development](https://img.shields.io/badge/-development-blue) + +**type:** `gcp.apphub.application` + +**Description:** Attributes denoting data from an Application in AppHub. See [AppHub overview](https://cloud.google.com/app-hub/docs/overview). + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`gcp.apphub.application.container`](/docs/attributes-registry/gcp.md) | string | The container within GCP where the AppHub application is defined. | `projects/my-container-project` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`gcp.apphub.application.id`](/docs/attributes-registry/gcp.md) | string | The name of the application as configured in AppHub. | `my-application` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`gcp.apphub.application.location`](/docs/attributes-registry/gcp.md) | string | The GCP zone or region where the application is defined. | `us-central1` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | + + + + + + +## Service + + + + + + + + + +**Status:** ![Development](https://img.shields.io/badge/-development-blue) + +**type:** `gcp.apphub.service` + +**Description:** Attributes denoting data from a Service in AppHub. See [AppHub overview](https://cloud.google.com/app-hub/docs/overview). + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`gcp.apphub.service.criticality_type`](/docs/attributes-registry/gcp.md) | string | Criticality of a service indicates its importance to the business. [1] | `MISSION_CRITICAL`; `HIGH`; `MEDIUM` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`gcp.apphub.service.environment_type`](/docs/attributes-registry/gcp.md) | string | Environment of a service is the stage of a software lifecycle. [2] | `PRODUCTION`; `STAGING`; `TEST` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`gcp.apphub.service.id`](/docs/attributes-registry/gcp.md) | string | The name of the service as configured in AppHub. | `my-service` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | + +**[1] `gcp.apphub.service.criticality_type`:** [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type) + +**[2] `gcp.apphub.service.environment_type`:** [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type_1) + +--- + +`gcp.apphub.service.criticality_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `HIGH` | High impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `LOW` | Low impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `MEDIUM` | Medium impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `MISSION_CRITICAL` | Mission critical service. | ![Development](https://img.shields.io/badge/-development-blue) | + +--- + +`gcp.apphub.service.environment_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `DEVELOPMENT` | Development environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `PRODUCTION` | Production environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `STAGING` | Staging environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `TEST` | Test environment. | ![Development](https://img.shields.io/badge/-development-blue) | + + + + + + +## Workload + + + + + + + + + +**Status:** ![Development](https://img.shields.io/badge/-development-blue) + +**type:** `gcp.apphub.workload` + +**Description:** Attributes denoting data from a Workload in AppHub. See [AppHub overview](https://cloud.google.com/app-hub/docs/overview). + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`gcp.apphub.workload.criticality_type`](/docs/attributes-registry/gcp.md) | string | Criticality of a workload indicates its importance to the business. [1] | `MISSION_CRITICAL`; `HIGH`; `MEDIUM` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`gcp.apphub.workload.environment_type`](/docs/attributes-registry/gcp.md) | string | Environment of a workload is the stage of a software lifecycle. [2] | `PRODUCTION`; `STAGING`; `TEST` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`gcp.apphub.workload.id`](/docs/attributes-registry/gcp.md) | string | The name of the workload as configured in AppHub. | `my-workload` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | + +**[1] `gcp.apphub.workload.criticality_type`:** [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type) + +**[2] `gcp.apphub.workload.environment_type`:** [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type_1) + +--- + +`gcp.apphub.workload.criticality_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `HIGH` | High impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `LOW` | Low impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `MEDIUM` | Medium impact. | ![Development](https://img.shields.io/badge/-development-blue) | +| `MISSION_CRITICAL` | Mission critical service. | ![Development](https://img.shields.io/badge/-development-blue) | + +--- + +`gcp.apphub.workload.environment_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `DEVELOPMENT` | Development environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `PRODUCTION` | Production environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `STAGING` | Staging environment. | ![Development](https://img.shields.io/badge/-development-blue) | +| `TEST` | Test environment. | ![Development](https://img.shields.io/badge/-development-blue) | + + + + + + +[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/model/gcp/apphub.yaml b/model/gcp/apphub.yaml new file mode 100644 index 0000000000..6a707cebe0 --- /dev/null +++ b/model/gcp/apphub.yaml @@ -0,0 +1,43 @@ +groups: + - id: resource.gcp.apphub.application + type: resource + stability: development + name: gcp.apphub.application + brief: > + Attributes denoting data from an Application in AppHub. + See [AppHub overview](https://cloud.google.com/app-hub/docs/overview). + attributes: + - ref: gcp.apphub.application.container + requirement_level: required + - ref: gcp.apphub.application.location + requirement_level: required + - ref: gcp.apphub.application.id + requirement_level: required + - id: resource.gcp.apphub.service + type: resource + stability: development + name: gcp.apphub.service + brief: > + Attributes denoting data from a Service in AppHub. + See [AppHub overview](https://cloud.google.com/app-hub/docs/overview). + attributes: + - ref: gcp.apphub.service.id + requirement_level: required + - ref: gcp.apphub.service.environment_type + requirement_level: required + - ref: gcp.apphub.service.criticality_type + requirement_level: required + - id: resource.gcp.apphub.workload + type: resource + stability: development + name: gcp.apphub.workload + brief: > + Attributes denoting data from a Workload in AppHub. + See [AppHub overview](https://cloud.google.com/app-hub/docs/overview). + attributes: + - ref: gcp.apphub.workload.id + requirement_level: required + - ref: gcp.apphub.workload.environment_type + requirement_level: required + - ref: gcp.apphub.workload.criticality_type + requirement_level: required diff --git a/model/gcp/registry.yaml b/model/gcp/registry.yaml index a66aa11dce..10bc7b4cbf 100644 --- a/model/gcp/registry.yaml +++ b/model/gcp/registry.yaml @@ -39,6 +39,139 @@ groups: [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. examples: [0, 1] + - id: registry.gcp.apphub + type: attribute_group + display_name: GCP - AppHub Attributes + brief: > + This document defines attributes AppHub will apply to resources in GCP. + See [AppHub overview](https://cloud.google.com/app-hub/docs/overview). + attributes: + - id: gcp.apphub.application.container + type: string + stability: development + brief: > + The container within GCP where the AppHub application is defined. + examples: ['projects/my-container-project'] + - id: gcp.apphub.application.location + type: string + stability: development + brief: > + The GCP zone or region where the application is defined. + examples: ['us-central1'] + - id: gcp.apphub.application.id + type: string + stability: development + brief: > + The name of the application as configured in AppHub. + examples: ['my-application'] + - id: gcp.apphub.service.id + type: string + stability: development + brief: > + The name of the service as configured in AppHub. + examples: ['my-service'] + - id: gcp.apphub.service.environment_type + type: + members: + - id: production + value: "PRODUCTION" + brief: Production environment. + stability: development + - id: staging + value: "STAGING" + brief: Staging environment. + stability: development + - id: test + value: "TEST" + brief: Test environment. + stability: development + - id: development + value: "DEVELOPMENT" + brief: Development environment. + stability: development + stability: development + brief: > + Environment of a service is the stage of a software lifecycle. + note: > + [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type_1) + - id: gcp.apphub.service.criticality_type + type: + members: + - id: mission_critical + value: "MISSION_CRITICAL" + brief: Mission critical service. + stability: development + - id: high + value: "HIGH" + brief: High impact. + stability: development + - id: medium + value: "MEDIUM" + brief: Medium impact. + stability: development + - id: low + value: "LOW" + brief: Low impact. + stability: development + stability: development + brief: > + Criticality of a service indicates its importance to the business. + note: > + [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type) + - id: gcp.apphub.workload.id + type: string + stability: development + brief: > + The name of the workload as configured in AppHub. + examples: ['my-workload'] + - id: gcp.apphub.workload.environment_type + type: + members: + - id: production + value: "PRODUCTION" + brief: Production environment. + stability: development + - id: staging + value: "STAGING" + brief: Staging environment. + stability: development + - id: test + value: "TEST" + brief: Test environment. + stability: development + - id: development + value: "DEVELOPMENT" + brief: Development environment. + stability: development + stability: development + brief: > + Environment of a workload is the stage of a software lifecycle. + note: > + [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type_1) + - id: gcp.apphub.workload.criticality_type + type: + members: + - id: mission_critical + value: "MISSION_CRITICAL" + brief: Mission critical service. + stability: development + - id: high + value: "HIGH" + brief: High impact. + stability: development + - id: medium + value: "MEDIUM" + brief: Medium impact. + stability: development + - id: low + value: "LOW" + brief: Low impact. + stability: development + stability: development + brief: > + Criticality of a workload indicates its importance to the business. + note: > + [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1alpha/Attributes#type) - id: registry.gcp.gce type: attribute_group display_name: GCP - Google Compute Engine (GCE) Attributes