diff --git a/.chloggen/mx-psi_ec2-instance-id.yaml b/.chloggen/mx-psi_ec2-instance-id.yaml new file mode 100755 index 0000000000..023845e6c9 --- /dev/null +++ b/.chloggen/mx-psi_ec2-instance-id.yaml @@ -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: diff --git a/docs/resource/cloud-provider/aws/ec2.md b/docs/resource/cloud-provider/aws/ec2.md new file mode 100644 index 0000000000..ad22d4d5b8 --- /dev/null +++ b/docs/resource/cloud-provider/aws/ec2.md @@ -0,0 +1,17 @@ +# AWS EC2 + +**Status**: [Experimental][DocumentStatus] + +**type:** `aws.ec2` + +**Description:** Resources used by Amazon Elastic Compute Cloud (Amazon 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. + + +[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md diff --git a/model/resource/cloud_provider/aws/ec2.yaml b/model/resource/cloud_provider/aws/ec2.yaml new file mode 100644 index 0000000000..3299fed44a --- /dev/null +++ b/model/resource/cloud_provider/aws/ec2.yaml @@ -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 + 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. + examples: ['i-1234567890abcdef0']