Skip to content

Commit

Permalink
Improvements for AWS/ECS attributes
Browse files Browse the repository at this point in the history
Added `aws.ecs.task.id`, to reflect changes introduced by [#29062][pr]
Also, fixed description for `aws.ecs.task.arn`, as it does not reflect
TaskDefinition ARN (as was incorrectly stated), but the ARN of the
running ECS Task.

[pr]: open-telemetry/opentelemetry-collector-contrib#29602
  • Loading branch information
mkielar committed Dec 9, 2023
1 parent eff3086 commit 3ea8625
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
7 changes: 4 additions & 3 deletions docs/resource/cloud-provider/aws/ecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
| `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 |
| `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 |
| `aws.ecs.launchtype` | string | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2` | Recommended |
| `aws.ecs.task.arn` | string | The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). | `arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b` | Recommended |
| `aws.ecs.task.family` | string | The task definition family this task definition is a member of. | `opentelemetry-family` | Recommended |
| `aws.ecs.task.revision` | string | The revision for this task definition. | `8`; `26` | Recommended |
| `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 |
| `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 |
| `aws.ecs.task.id` | string | The ID of a running ECS task, extracted from its ARN. | `10838bed-421f-43ef-870a-f43feacbbb5b`; `23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd` | Recommended |
| `aws.ecs.task.revision` | string | The revision for the task definition used to create the ECS task. | `8`; `26` | Recommended |

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

Expand Down
16 changes: 12 additions & 4 deletions model/resource/cloud_provider/aws/ecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,23 @@ groups:
- id: task.arn
type: string
brief: >
The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
examples: ['arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b']
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
brief: >
The task definition family this task definition is a member of.
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
brief: >
The ID of a running ECS task, extracted from its ARN.
examples: [ '10838bed-421f-43ef-870a-f43feacbbb5b', '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' ]
- id: task.revision
type: string
brief: >
The revision for this task definition.
The revision for the task definition used to create the ECS task.
examples: ["8", "26"]

0 comments on commit 3ea8625

Please sign in to comment.