Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GCP AppHub resource labels #2006

Merged
merged 14 commits into from
Mar 21, 2025
22 changes: 22 additions & 0 deletions .chloggen/gcp-apphub.yaml
Original file line number Diff line number Diff line change
@@ -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:
73 changes: 71 additions & 2 deletions docs/attributes-registry/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
|---|---|---|---|---|
| <a id="gcp-apphub-application-container" href="#gcp-apphub-application-container">`gcp.apphub.application.container`</a> | string | The container within GCP where the AppHub application is defined. | `projects/my-container-project` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="gcp-apphub-application-id" href="#gcp-apphub-application-id">`gcp.apphub.application.id`</a> | string | The name of the application as configured in AppHub. | `my-application` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="gcp-apphub-application-location" href="#gcp-apphub-application-location">`gcp.apphub.application.location`</a> | string | The GCP zone or region where the application is defined. | `us-central1` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="gcp-apphub-service-criticality-type" href="#gcp-apphub-service-criticality-type">`gcp.apphub.service.criticality_type`</a> | string | Criticality of a service indicates its importance to the business. [1] | `MISSION_CRITICAL`; `HIGH`; `MEDIUM` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="gcp-apphub-service-environment-type" href="#gcp-apphub-service-environment-type">`gcp.apphub.service.environment_type`</a> | string | Environment of a service is the stage of a software lifecycle. [2] | `PRODUCTION`; `STAGING`; `TEST` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="gcp-apphub-service-id" href="#gcp-apphub-service-id">`gcp.apphub.service.id`</a> | string | The name of the service as configured in AppHub. | `my-service` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="gcp-apphub-workload-criticality-type" href="#gcp-apphub-workload-criticality-type">`gcp.apphub.workload.criticality_type`</a> | string | Criticality of a workload indicates its importance to the business. [3] | `MISSION_CRITICAL`; `HIGH`; `MEDIUM` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="gcp-apphub-workload-environment-type" href="#gcp-apphub-workload-environment-type">`gcp.apphub.workload.environment_type`</a> | string | Environment of a workload is the stage of a software lifecycle. [4] | `PRODUCTION`; `STAGING`; `TEST` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="gcp-apphub-workload-id" href="#gcp-apphub-workload-id">`gcp.apphub.workload.id`</a> | 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 |
|---|---|---|---|---|
| <a id="gcp-client-service" href="#gcp-client-service">`gcp.client.service`</a> | 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) |
| <a id="gcp-client-service" href="#gcp-client-service">`gcp.client.service`</a> | 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

Expand Down
1 change: 1 addition & 0 deletions docs/resource/cloud-provider/gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
146 changes: 146 additions & 0 deletions docs/resource/cloud-provider/gcp/apphub.md
Original file line number Diff line number Diff line change
@@ -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

<!-- semconv resource.gcp.apphub.application -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->


**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) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Service

<!-- semconv resource.gcp.apphub.service -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->


**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) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Workload

<!-- semconv resource.gcp.apphub.workload -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->


**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) |

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
43 changes: 43 additions & 0 deletions model/gcp/apphub.yaml
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading