Skip to content
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:
29 changes: 27 additions & 2 deletions docs/attributes-registry/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,44 @@

# 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 an application, service, or workload indicates its importance to the business. [1] | `CRITICAL`; `HIGH`; `MEDIUM`; `LOW` | ![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 an application, service, or workload is the stage of a software lifecycle, for example, production, staging, or development. [2] | `DEVELOPMENT`; `TEST`; `STAGING`; `PRODUCTION` | ![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 an application, service, or workload indicates its importance to the business. [3] | `CRITICAL`; `HIGH`; `MEDIUM`; `LOW` | ![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 an application, service, or workload is the stage of a software lifecycle, for example, production, staging, or development. [4] | `DEVELOPMENT`; `TEST`; `STAGING`; `PRODUCTION` | ![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 properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)

**[2] `gcp.apphub.service.environment_type`:** [See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)

**[3] `gcp.apphub.workload.criticality_type`:** [See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)

**[4] `gcp.apphub.workload.environment_type`:** [See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)

## 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
102 changes: 102 additions & 0 deletions docs/resource/cloud-provider/gcp/apphub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Google Cloud AppHub

**Status**: [Development][DocumentStatus]

These conventions are used by Google Cloud when using AppHub. Observability
Comment thread
jsuereth marked this conversation as resolved.
Outdated
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 an application, service, or workload indicates its importance to the business. [1] | `CRITICAL`; `HIGH`; `MEDIUM`; `LOW` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gcp.apphub.service.environment_type`](/docs/attributes-registry/gcp.md) | string | Environment of an application, service, or workload is the stage of a software lifecycle, for example, production, staging, or development. [2] | `DEVELOPMENT`; `TEST`; `STAGING`; `PRODUCTION` | `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 properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)

**[2] `gcp.apphub.service.environment_type`:** [See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)

<!-- 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 an application, service, or workload indicates its importance to the business. [1] | `CRITICAL`; `HIGH`; `MEDIUM`; `LOW` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`gcp.apphub.workload.environment_type`](/docs/attributes-registry/gcp.md) | string | Environment of an application, service, or workload is the stage of a software lifecycle, for example, production, staging, or development. [2] | `DEVELOPMENT`; `TEST`; `STAGING`; `PRODUCTION` | `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 properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)

**[2] `gcp.apphub.workload.environment_type`:** [See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)

<!-- 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
69 changes: 69 additions & 0 deletions model/gcp/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,75 @@ 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
Comment thread
lmolkova marked this conversation as resolved.
type: string
stability: development
brief: >
Environment of an application, service, or workload is the stage of a software lifecycle, for example, production, staging, or development.
note: >
[See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)
examples: ['DEVELOPMENT', 'TEST', 'STAGING', 'PRODUCTION']
- id: gcp.apphub.service.criticality_type
Comment thread
lmolkova marked this conversation as resolved.
type: string
stability: development
brief: >
Criticality of an application, service, or workload indicates its importance to the business.
note: >
[See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)
examples: ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW']
- 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
Comment thread
lmolkova marked this conversation as resolved.
type: string
stability: development
brief: >
Environment of an application, service, or workload is the stage of a software lifecycle, for example, production, staging, or development.
Comment thread
jsuereth marked this conversation as resolved.
Outdated
note: >
[See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)
examples: ['DEVELOPMENT', 'TEST', 'STAGING', 'PRODUCTION']
Comment thread
jsuereth marked this conversation as resolved.
Outdated
- id: gcp.apphub.workload.criticality_type
type: string
stability: development
brief: >
Criticality of an application, service, or workload indicates its importance to the business.
note: >
[See AppHub properties and attributes](https://cloud.google.com/app-hub/docs/overview#properties-attributes)
examples: ['CRITICAL', 'HIGH', 'MEDIUM', 'LOW']
- id: registry.gcp.gce
type: attribute_group
display_name: GCP - Google Compute Engine (GCE) Attributes
Expand Down