From 3ea8625b217c517845356c2c4ea220854861db93 Mon Sep 17 00:00:00 2001 From: Marcin Kielar Date: Sat, 9 Dec 2023 20:19:26 +0100 Subject: [PATCH 1/7] Improvements for AWS/ECS attributes 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]: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/29602 --- docs/resource/cloud-provider/aws/ecs.md | 7 ++++--- model/resource/cloud_provider/aws/ecs.yaml | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/resource/cloud-provider/aws/ecs.md b/docs/resource/cloud-provider/aws/ecs.md index 362b66dde9..8023ff9291 100644 --- a/docs/resource/cloud-provider/aws/ecs.md +++ b/docs/resource/cloud-provider/aws/ecs.md @@ -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: diff --git a/model/resource/cloud_provider/aws/ecs.yaml b/model/resource/cloud_provider/aws/ecs.yaml index 2c6b8c9ba5..0dd4447c9e 100644 --- a/model/resource/cloud_provider/aws/ecs.yaml +++ b/model/resource/cloud_provider/aws/ecs.yaml @@ -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"] From 1e64e373f336b7e1f5f7af3df96906a9647360f6 Mon Sep 17 00:00:00 2001 From: Marcin Kielar Date: Sat, 9 Dec 2023 20:50:21 +0100 Subject: [PATCH 2/7] Updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a80ebaa7fc..e139917b59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ release. ([#345](https://github.com/open-telemetry/semantic-conventions/pull/345)) - Add messaging metrics ([#163](https://github.com/open-telemetry/semantic-conventions/pull/163)) +- Add `aws.ecs.task.id` attribute + ([#597](https://github.com/open-telemetry/semantic-conventions/pull/597)) ### Fixes From eb710f98d2ab41e715fa16836304fa1146ead8cc Mon Sep 17 00:00:00 2001 From: Marcin Kielar Date: Mon, 11 Dec 2023 14:36:02 +0100 Subject: [PATCH 3/7] Added aws.ecs.task.arn correction to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e139917b59..314f8af5ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,7 @@ release. ([#345](https://github.com/open-telemetry/semantic-conventions/pull/345)) - Add messaging metrics ([#163](https://github.com/open-telemetry/semantic-conventions/pull/163)) -- Add `aws.ecs.task.id` attribute +- Add `aws.ecs.task.id` attribute, corrected description for `aws.ecs.task.arn`. ([#597](https://github.com/open-telemetry/semantic-conventions/pull/597)) ### Fixes From b7b259b0562ff7e81ae79218cc2d0df65314e971 Mon Sep 17 00:00:00 2001 From: Joao Grassi Date: Wed, 10 Jan 2024 13:05:28 +0100 Subject: [PATCH 4/7] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b69ca604e7..562025c538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,9 +18,12 @@ release. - Add `azure_container_apps` to `cloud.platform` semantic conventions ([#615](https://github.com/open-telemetry/semantic-conventions/pull/615)) +- Add `aws.ecs.task.id` attribute, corrected description for `aws.ecs.task.arn`. + ([#597](https://github.com/open-telemetry/semantic-conventions/pull/597)) - Add an example for gcp_pubsub asynchronous batch publish ([#545](https://github.com/open-telemetry/semantic-conventions/pull/545)). + ### Fixes - Clarify that `service.*` attributes apply to all telemetry sources. @@ -74,8 +77,6 @@ release. ([#163](https://github.com/open-telemetry/semantic-conventions/pull/163)) - Add .NET 8.0 metrics for HTTP client, ASP.NET Core, SignalR server and Kestrel. ([#283](https://github.com/open-telemetry/semantic-conventions/pull/283)) -- Add `aws.ecs.task.id` attribute, corrected description for `aws.ecs.task.arn`. - ([#597](https://github.com/open-telemetry/semantic-conventions/pull/597)) - Add system shared IO direction attributes ([#530](https://github.com/open-telemetry/semantic-conventions/pull/530)) - JVM metrics marked stable From 0a838d974691d1d6432f93a799859fe98db2c456 Mon Sep 17 00:00:00 2001 From: Joao Grassi Date: Wed, 10 Jan 2024 13:05:51 +0100 Subject: [PATCH 5/7] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 562025c538..44390653c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,6 @@ release. - Add an example for gcp_pubsub asynchronous batch publish ([#545](https://github.com/open-telemetry/semantic-conventions/pull/545)). - ### Fixes - Clarify that `service.*` attributes apply to all telemetry sources. From 33b6c3fa6041626415d08ab03d10ab5507aa201a Mon Sep 17 00:00:00 2001 From: Joao Grassi Date: Wed, 10 Jan 2024 13:10:17 +0100 Subject: [PATCH 6/7] Change requirement level of task.id `task.id` is extracted from `task.arn`, so it's conditionally required based on its presence. --- model/resource/cloud_provider/aws/ecs.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/model/resource/cloud_provider/aws/ecs.yaml b/model/resource/cloud_provider/aws/ecs.yaml index 0dd4447c9e..15bd848e61 100644 --- a/model/resource/cloud_provider/aws/ecs.yaml +++ b/model/resource/cloud_provider/aws/ecs.yaml @@ -41,7 +41,9 @@ groups: - id: task.id type: string brief: > - The ID of a running ECS task, extracted from its ARN. + The ID of a running ECS task. The ID MUST be extracted from `task.arn`. + requirement_level: + conditionally_required: If and only `task.arn` is populated. examples: [ '10838bed-421f-43ef-870a-f43feacbbb5b', '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' ] - id: task.revision type: string From 6d0f95e57e4e896c004e2ad9cabe109d3c8b4976 Mon Sep 17 00:00:00 2001 From: Joao Grassi Date: Wed, 10 Jan 2024 09:30:30 -0300 Subject: [PATCH 7/7] Re-generate md table --- docs/resource/cloud-provider/aws/ecs.md | 2 +- model/resource/cloud_provider/aws/ecs.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resource/cloud-provider/aws/ecs.md b/docs/resource/cloud-provider/aws/ecs.md index 8023ff9291..2edafe56b9 100644 --- a/docs/resource/cloud-provider/aws/ecs.md +++ b/docs/resource/cloud-provider/aws/ecs.md @@ -14,7 +14,7 @@ | `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 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.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. | | `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: diff --git a/model/resource/cloud_provider/aws/ecs.yaml b/model/resource/cloud_provider/aws/ecs.yaml index 15bd848e61..a40f950c18 100644 --- a/model/resource/cloud_provider/aws/ecs.yaml +++ b/model/resource/cloud_provider/aws/ecs.yaml @@ -43,7 +43,7 @@ groups: brief: > The ID of a running ECS task. The ID MUST be extracted from `task.arn`. requirement_level: - conditionally_required: If and only `task.arn` is populated. + 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