Skip to content

Commit

Permalink
[chore] Combine GCP attributes (#888)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi authored Apr 5, 2024
1 parent 94cf27b commit 1f3c27e
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 55 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ body:
- area:faas
- area:feature-flag
- area:file
- area:gcp-cloud-run
- area:gcp-gce
- area:gcp
- area:graphql
- area:heroku
- area:host
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ body:
- area:faas
- area:feature-flag
- area:file
- area:gcp-cloud-run
- area:gcp-gce
- area:gcp
- area:graphql
- area:heroku
- area:host
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ body:
- area:faas
- area:feature-flag
- area:file
- area:gcp-cloud-run
- area:gcp-gce
- area:gcp
- area:graphql
- area:heroku
- area:host
Expand Down
3 changes: 1 addition & 2 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ Currently, the following namespaces exist:
* [FaaS](faas.md)
* [Feature Flag](feature-flag.md)
* [File](file.md)
* [Google Cloud Run](gcp-cloud-run.md)
* [Google Compute Engine](gcp-gce.md)
* [Google Cloud Platform (GCP)](gcp.md)
* [GraphQl](graphql.md)
* [Heroku](heroku.md)
* [Host](host.md)
Expand Down
9 changes: 0 additions & 9 deletions docs/attributes-registry/gcp-cloud-run.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/attributes-registry/gcp-gce.md

This file was deleted.

24 changes: 24 additions & 0 deletions docs/attributes-registry/gcp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Google Cloud Platform

<!-- toc -->

- [Google Compute Engine Attributes](#google-compute-engine-attributes)
- [Google Cloud Run Attributes](#google-cloud-run-attributes)

<!-- tocstop -->

## Google Compute Engine Attributes
<!-- semconv registry.gcp.gce(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `gcp.gce.instance.hostname` | string | The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). | `my-host1234.example.com`; `sample-vm.us-west1-b.c.my-project.internal` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gcp.gce.instance.name` | string | The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). | `instance-1`; `my-vm-name` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## Google Cloud Run Attributes
<!-- semconv registry.gcp.cloud_run(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `gcp.cloud_run.job.execution` | string | The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. | `job-name-xxxx`; `sample-job-mdw84` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gcp.cloud_run.job.task_index` | int | The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. | `0`; `1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->
4 changes: 2 additions & 2 deletions docs/resource/cloud-provider/gcp/cloud-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ These conventions are recommended for resources running on Cloud Run.
<!-- semconv gcp.cloud_run -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`gcp.cloud_run.job.execution`](../../../attributes-registry/gcp-cloud-run.md) | string | The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. | `job-name-xxxx`; `sample-job-mdw84` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gcp.cloud_run.job.task_index`](../../../attributes-registry/gcp-cloud-run.md) | int | The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. | `0`; `1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gcp.cloud_run.job.execution`](../../../attributes-registry/gcp.md) | string | The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. | `job-name-xxxx`; `sample-job-mdw84` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gcp.cloud_run.job.task_index`](../../../attributes-registry/gcp.md) | int | The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. | `0`; `1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md
4 changes: 2 additions & 2 deletions docs/resource/cloud-provider/gcp/gce.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<!-- semconv gcp.gce -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`gcp.gce.instance.hostname`](../../../attributes-registry/gcp-gce.md) | string | The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). | `my-host1234.example.com`; `sample-vm.us-west1-b.c.my-project.internal` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gcp.gce.instance.name`](../../../attributes-registry/gcp-gce.md) | string | The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). | `instance-1`; `my-vm-name` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gcp.gce.instance.hostname`](../../../attributes-registry/gcp.md) | string | The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). | `my-host1234.example.com`; `sample-vm.us-west1-b.c.my-project.internal` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`gcp.gce.instance.name`](../../../attributes-registry/gcp.md) | string | The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). | `instance-1`; `my-vm-name` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->
25 changes: 0 additions & 25 deletions model/registry/gcp-cloud-run.yaml

This file was deleted.

24 changes: 24 additions & 0 deletions model/registry/gcp-gce.yaml → model/registry/gcp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
groups:
- id: registry.gcp.cloud_run
prefix: gcp.cloud_run
type: attribute_group
brief: >
This document defines attributes for Google Cloud Run.
attributes:
- id: job.execution
type: string
stability: experimental
brief: >
The name of the Cloud Run
[execution](https://cloud.google.com/run/docs/managing/job-executions)
being run for the Job, as set by the
[`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
environment variable.
examples: ['job-name-xxxx', 'sample-job-mdw84']
- id: job.task_index
type: int
stability: experimental
brief: >
The index for a task within an execution as provided by the
[`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
environment variable.
examples: [0, 1]
- id: registry.gcp.gce
prefix: gcp.gce
type: attribute_group
Expand Down

0 comments on commit 1f3c27e

Please sign in to comment.