-
Notifications
You must be signed in to change notification settings - Fork 182
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
[cloud provider] Add AWS EC2 instance id semantic convention #600
base: main
Are you sure you want to change the base?
Changes from all commits
ae07bd2
d9b4093
7d194f7
ba53832
81f7aa6
a72994d
70b374d
6508721
0e71d05
997d4b1
c20f25d
4fbfab3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 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: resource/cloud-provider | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Add `aws.ec2.instance.id` resource attribute for AWS EC2 VMs. | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [600] | ||
|
||
# (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: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# AWS EC2 | ||
|
||
**Status**: [Experimental][DocumentStatus] | ||
|
||
**type:** `aws.ec2` | ||
|
||
**Description:** Resources used by Amazon Elastic Compute Cloud (Amazon EC2). | ||
|
||
<!-- semconv aws.ec2 --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| `aws.ec2.instance.id` | string | The instance id of an AWS EC2 instance. This is the value provided by the [EC2 Metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html) endpoint under `instance-id`. [1] | `i-1234567890abcdef0` | Recommended | | ||
|
||
**[1]:** When both `host.id` and `aws.ec2.instance.id` are present, they SHOULD be equal. | ||
<!-- endsemconv --> | ||
|
||
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,17 @@ | ||||||||||
groups: | ||||||||||
- id: aws.ec2 | ||||||||||
prefix: aws.ec2 | ||||||||||
type: resource | ||||||||||
brief: > | ||||||||||
Resources used by Amazon Elastic Compute Cloud (Amazon EC2). | ||||||||||
attributes: | ||||||||||
- id: instance.id | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mx-psi Can you move the definition of this attribute to the registry and use a reference here? (see https://github.com/open-telemetry/semantic-conventions/pull/434/files for an example) |
||||||||||
type: string | ||||||||||
brief: > | ||||||||||
The instance id of an AWS EC2 instance. This is the value | ||||||||||
provided by the [EC2 Metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html) | ||||||||||
endpoint under `instance-id`. | ||||||||||
note: > | ||||||||||
When both `host.id` and `aws.ec2.instance.id` are present, | ||||||||||
they SHOULD be equal. | ||||||||||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this also be phrased as follows to avoid duplication?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per #576 (comment) I believe this is not what we do in similar cases such as with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @arminru PTAL! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It certainly makes the logic for both setting and reading the attribute easier. The duplicated string should in transport be taken care of by compression and also backends storing it would be able to deduplicate it as well. I don't think we ever made a proper policy decision on whether to favor simplicity (for both instrumentation and querying) or deduplication but I believe either is a viable approach to take. @open-telemetry/specs-semconv-approvers WDYT? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
fwiw, we abandoned de-duplication in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this moves in a direction I'm hoping to push resource-detection - That is a division of responsibilities. An AWS detector would be responsible for this attribute but NOT host.id. Instead a Host Detector would generically detect host attributes as best as possible across known host-lookup mechanisms. I'm writing up thoughts on this now, but I'd be in favor of this PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@jsuereth Do you have any updates on this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm supportive of the addition as originally proposed by @mx-psi |
||||||||||
examples: ['i-1234567890abcdef0'] |
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.
Please stop using prefix.