-
Notifications
You must be signed in to change notification settings - Fork 894
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add detail for GCP Cloud Run Job execution (#3378)
- Loading branch information
Showing
6 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
semantic_conventions/resource/cloud_provider/gcp/cloud_run.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
groups: | ||
- id: gcp.cloud_run | ||
prefix: gcp.cloud_run | ||
type: resource | ||
brief: > | ||
Resource used by Google Cloud Run. | ||
attributes: | ||
- id: job.execution | ||
type: string | ||
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 | ||
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
specification/resource/semantic_conventions/cloud_provider/gcp/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# GCP Semantic Conventions | ||
|
||
This directory defines standards for resource attributes that only apply to | ||
Google Cloud Platform (GCP). If an attribute could apply to resources from more than one cloud | ||
provider (like account ID, operating system, etc), it belongs in the parent | ||
`semantic_conventions` directory. | ||
|
||
## Services | ||
|
||
- [Cloud Run](./cloud_run.md) |
14 changes: 14 additions & 0 deletions
14
specification/resource/semantic_conventions/cloud_provider/gcp/cloud_run.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Google Cloud Run | ||
|
||
These conventions are recommended for resources running on Cloud Run. | ||
|
||
**Type:** `gcp.cloud_run` | ||
|
||
**Description:** Resource attributes for GCE instances. | ||
|
||
<!-- semconv gcp.cloud_run --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| `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` | Recommended | | ||
| `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` | Recommended | | ||
<!-- endsemconv --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters