-
Notifications
You must be signed in to change notification settings - Fork 889
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 semantic conventions for GCP resources #3384
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
groups: | ||
- id: gcp.gce | ||
prefix: gcp.gce | ||
type: resource | ||
brief: > | ||
Resources used by Google Compute Engine (GCE). | ||
attributes: | ||
- id: instance.name | ||
type: string | ||
brief: > | ||
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). | ||
examples: ['instance-1', 'my-vm-name'] | ||
- id: instance.hostname | ||
type: string | ||
brief: > | ||
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). | ||
examples: ['my-host1234.example.com', 'sample-vm.us-west1-b.c.my-project.internal'] |
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 | ||
|
||
- [Google Compute Engine](./gce.md) |
12 changes: 12 additions & 0 deletions
12
specification/resource/semantic_conventions/cloud_provider/gcp/gce.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,12 @@ | ||
# Google Compute Engine | ||
|
||
**Type:** `gcp.gce` | ||
|
||
**Description:** Resource attributes for GCE instances. | ||
|
||
<!-- semconv gcp.gce --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| `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` | Recommended | | ||
| `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` | Recommended | | ||
<!-- endsemconv --> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this just
ref: host.name
instead of define a new field?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that sounds good, but
gcp.gce.instance.name
would actually be the new field that shouldref: host.name
(currentlyhost.name
is set to the instance name)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming what we discussed, we use the instance name to set
host.name
(also for GKE). We don't currently set the actual hostname anywhere.