-
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 2 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,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 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,16 @@ | ||||||||||
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 endpoint under `instance-id`. | ||||||||||
mx-psi marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
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.