Skip to content
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

[chore] Move AWS ECS, EKS and Log attributes to the registry #848

Merged
46 changes: 46 additions & 0 deletions docs/attributes-registry/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<!-- toc -->

- [AWS DynamoDB Attributes](#aws-dynamodb-attributes)
- [AWS ECS Attributes](#aws-ecs-attributes)
- [AWS EKS Attributes](#aws-eks-attributes)
- [AWS Logs Attributes](#aws-logs-attributes)

<!-- tocstop -->

Expand Down Expand Up @@ -32,4 +35,47 @@
| `aws.dynamodb.table_count` | int | The number of items in the `TableNames` response parameter. | `20` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.dynamodb.table_names` | string[] | The keys in the `RequestItems` object field. | `[Users, Cats]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.dynamodb.total_segments` | int | The value of the `TotalSegments` request parameter. | `100` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## AWS ECS Attributes
<!-- semconv registry.aws.ecs(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `aws.ecs.task.id` | string | The ID of a running ECS task. The ID MUST be extracted from `task.arn`. | `10838bed-421f-43ef-870a-f43feacbbb5b`; `23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.cluster.arn` | string | The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.container.arn` | string | The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). | `arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.launchtype` | string | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.task.arn` | string | The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). | `arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b`; `arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.task.family` | string | The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. | `opentelemetry-family` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.task.revision` | string | The revision for the task definition used to create the ECS task. | `8`; `26` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`aws.ecs.launchtype` MUST be one of the following:

| Value | Description | Stability |
|---|---|---|
| `ec2` | ec2 | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `fargate` | fargate | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## AWS EKS Attributes
<!-- semconv registry.aws.eks(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `aws.eks.cluster.arn` | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

## AWS Logs Attributes
<!-- semconv registry.aws.log(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `aws.log.group.arns` | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [1] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.log.group.names` | string[] | The name(s) of the AWS log group(s) an application is writing to. [2] | `[/aws/lambda/my-function, opentelemetry-service]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.log.stream.arns` | string[] | The ARN(s) of the AWS log stream(s). [3] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.log.stream.names` | string[] | The name(s) of the AWS log stream(s) an application is writing to. | `[logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).

**[2]:** Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.

**[3]:** See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.
<!-- endsemconv -->
16 changes: 8 additions & 8 deletions docs/resource/cloud-provider/aws/ecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

**Description:** Resources used by AWS Elastic Container Service (ECS).

<!-- semconv aws.ecs -->
<!-- semconv aws.ecs(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| `aws.ecs.task.id` | string | The ID of a running ECS task. The ID MUST be extracted from `task.arn`. | `10838bed-421f-43ef-870a-f43feacbbb5b`; `23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd` | `Conditionally Required` If and only if `task.arn` is populated. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.cluster.arn` | string | The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.container.arn` | string | The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). | `arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.launchtype` | string | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.task.arn` | string | The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). | `arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b`; `arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.task.family` | string | The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. | `opentelemetry-family` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.ecs.task.revision` | string | The revision for the task definition used to create the ECS task. | `8`; `26` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.ecs.task.id`](../../../attributes-registry/aws.md) | string | The ID of a running ECS task. The ID MUST be extracted from `task.arn`. | `10838bed-421f-43ef-870a-f43feacbbb5b`; `23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd` | `Conditionally Required` If and only if `task.arn` is populated. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.ecs.cluster.arn`](../../../attributes-registry/aws.md) | string | The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.ecs.container.arn`](../../../attributes-registry/aws.md) | string | The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). | `arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.ecs.launchtype`](../../../attributes-registry/aws.md) | string | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.ecs.task.arn`](../../../attributes-registry/aws.md) | string | The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). | `arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b`; `arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.ecs.task.family`](../../../attributes-registry/aws.md) | string | The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. | `opentelemetry-family` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.ecs.task.revision`](../../../attributes-registry/aws.md) | string | The revision for the task definition used to create the ECS task. | `8`; `26` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`aws.ecs.launchtype` MUST be one of the following:

Expand Down
2 changes: 1 addition & 1 deletion docs/resource/cloud-provider/aws/eks.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- semconv aws.eks -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| `aws.eks.cluster.arn` | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.eks.cluster.arn`](../../../attributes-registry/aws.md) | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md
8 changes: 4 additions & 4 deletions docs/resource/cloud-provider/aws/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<!-- semconv aws.log -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| `aws.log.group.arns` | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [1] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.log.group.names` | string[] | The name(s) of the AWS log group(s) an application is writing to. [2] | `[/aws/lambda/my-function, opentelemetry-service]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.log.stream.arns` | string[] | The ARN(s) of the AWS log stream(s). [3] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `aws.log.stream.names` | string[] | The name(s) of the AWS log stream(s) an application is writing to. | `[logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.log.group.arns`](../../../attributes-registry/aws.md) | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [1] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.log.group.names`](../../../attributes-registry/aws.md) | string[] | The name(s) of the AWS log group(s) an application is writing to. [2] | `[/aws/lambda/my-function, opentelemetry-service]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.log.stream.arns`](../../../attributes-registry/aws.md) | string[] | The ARN(s) of the AWS log stream(s). [3] | `[arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`aws.log.stream.names`](../../../attributes-registry/aws.md) | string[] | The name(s) of the AWS log stream(s) an application is writing to. | `[logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).

Expand Down
114 changes: 114 additions & 0 deletions model/registry/aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,117 @@ groups:
"WriteCapacityUnits": number
}
}'
- id: registry.aws.ecs
joaopgrassi marked this conversation as resolved.
Show resolved Hide resolved
prefix: aws.ecs
type: attribute_group
brief: >
This document defines attributes for AWS Elastic Container Service (ECS).
attributes:
- id: container.arn
type: string
stability: experimental
brief: >
The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
examples: ['arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9']
- id: cluster.arn
type: string
stability: experimental
brief: >
The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
examples: ['arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster']
- id: launchtype
type:
allow_custom_values: false
members:
- id: ec2
value: "ec2"
stability: experimental
- id: fargate
value: "fargate"
stability: experimental
stability: experimental
brief: >
The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.
- id: task.arn
type: string
stability: experimental
brief: >
The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).
examples: [
'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b',
'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd'
]
- id: task.family
type: string
stability: experimental
brief: >
The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task.
examples: ['opentelemetry-family']
- id: task.id
type: string
stability: experimental
brief: >
The ID of a running ECS task. The ID MUST be extracted from `task.arn`.
requirement_level:
conditionally_required: If and only if `task.arn` is populated.
examples: [ '10838bed-421f-43ef-870a-f43feacbbb5b', '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' ]
- id: task.revision
type: string
stability: experimental
brief: >
The revision for the task definition used to create the ECS task.
examples: ["8", "26"]
- id: registry.aws.eks
prefix: aws.eks
type: resource
brief: >
This document defines attributes for AWS Elastic Kubernetes Service (EKS).
attributes:
- id: cluster.arn
type: string
stability: experimental
brief: >
The ARN of an EKS cluster.
examples: ['arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster']
- id: registry.aws.log
prefix: aws.log
type: attribute_group
brief: >
This document defines attributes for AWS Logs.
attributes:
- id: group.names
type: string[]
stability: experimental
brief: >
The name(s) of the AWS log group(s) an application is writing to.
examples: ['/aws/lambda/my-function', 'opentelemetry-service']
note: >
Multiple log groups must be supported for cases like multi-container applications,
where a single application has sidecar containers, and each write to their own log
group.
- id: group.arns
type: string[]
stability: experimental
brief: >
The Amazon Resource Name(s) (ARN) of the AWS log group(s).
examples: ['arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*']
note: >
See the
[log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
- id: stream.names
type: string[]
stability: experimental
brief: >
The name(s) of the AWS log stream(s) an application is writing to.
examples: ['logs/main/10838bed-421f-43ef-870a-f43feacbbb5b']
- id: stream.arns
type: string[]
stability: experimental
brief: >
The ARN(s) of the AWS log stream(s).
examples: ['arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b']
note: >
See the
[log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
One log group can contain several log streams, so these ARNs necessarily identify both a log
group and a log stream.
Loading
Loading