From 4623bdfd2a70c7c17564f9341f9a05fafa6d3f0f Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:34:51 +0100 Subject: [PATCH 1/9] Move AWS ECS attributes to the registry --- docs/attributes-registry/README.md | 1 + docs/attributes-registry/aws-ecs.md | 21 ++++++++ docs/resource/cloud-provider/aws/ecs.md | 16 +++--- model/registry/aws-ecs.yaml | 59 ++++++++++++++++++++ model/resource/cloud_provider/aws/ecs.yaml | 63 +++++----------------- 5 files changed, 102 insertions(+), 58 deletions(-) create mode 100644 docs/attributes-registry/aws-ecs.md create mode 100644 model/registry/aws-ecs.yaml diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 00ff6ad8e6..f57e116785 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -28,6 +28,7 @@ All registered attributes are listed by namespace in this registry. Currently, the following namespaces exist: * [Android](android.md) +* [AWS ECS](aws-ecs.md) * [Browser](browser.md) * [Client](client.md) * [Cloud](cloud.md) diff --git a/docs/attributes-registry/aws-ecs.md b/docs/attributes-registry/aws-ecs.md new file mode 100644 index 0000000000..13e7618cfb --- /dev/null +++ b/docs/attributes-registry/aws-ecs.md @@ -0,0 +1,21 @@ +# AWS ECS + +## AWS ECS Attributes + +| Attribute | Type | Description | Examples | +|---|---|---|---| +| `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` | +| `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` | +| `aws.ecs.launchtype` | string | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2` | +| `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` | +| `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` | +| `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` | +| `aws.ecs.task.revision` | string | The revision for the task definition used to create the ECS task. | `8`; `26` | + +`aws.ecs.launchtype` MUST be one of the following: + +| Value | Description | +|---|---| +| `ec2` | ec2 | +| `fargate` | fargate | + diff --git a/docs/resource/cloud-provider/aws/ecs.md b/docs/resource/cloud-provider/aws/ecs.md index 2edafe56b9..88c23017fc 100644 --- a/docs/resource/cloud-provider/aws/ecs.md +++ b/docs/resource/cloud-provider/aws/ecs.md @@ -6,16 +6,16 @@ **Description:** Resources used by AWS Elastic Container Service (ECS). - + | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `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 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. 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.cluster.arn`](../../../attributes-registry/aws-ecs.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 | +| [`aws.ecs.container.arn`](../../../attributes-registry/aws-ecs.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 | +| [`aws.ecs.launchtype`](../../../attributes-registry/aws-ecs.md) | 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`](../../../attributes-registry/aws-ecs.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 | +| [`aws.ecs.task.family`](../../../attributes-registry/aws-ecs.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 | +| [`aws.ecs.task.id`](../../../attributes-registry/aws-ecs.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. | +| [`aws.ecs.task.revision`](../../../attributes-registry/aws-ecs.md) | 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/registry/aws-ecs.yaml b/model/registry/aws-ecs.yaml new file mode 100644 index 0000000000..c1d2339da7 --- /dev/null +++ b/model/registry/aws-ecs.yaml @@ -0,0 +1,59 @@ +groups: + - id: registry.aws.ecs + 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" + - id: fargate + value: "fargate" + 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"] diff --git a/model/resource/cloud_provider/aws/ecs.yaml b/model/resource/cloud_provider/aws/ecs.yaml index a3c4b3f8b1..53c998c575 100644 --- a/model/resource/cloud_provider/aws/ecs.yaml +++ b/model/resource/cloud_provider/aws/ecs.yaml @@ -1,59 +1,22 @@ groups: - id: aws.ecs - prefix: aws.ecs type: resource brief: > Resources used by 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" - - id: fargate - value: "fargate" - 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`. + - ref: aws.ecs.container.arn + requirement_level: recommended + - ref: aws.ecs.cluster.arn + requirement_level: recommended + - ref: aws.ecs.launchtype + requirement_level: recommended + - ref: aws.ecs.task.arn + requirement_level: recommended + - ref: aws.ecs.task.family + requirement_level: recommended + - ref: aws.ecs.task.id 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"] + - ref: aws.ecs.task.revision + requirement_level: recommended From 5b8b390a039c321010fbbafc45d61e7ab7032554 Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:38:08 +0100 Subject: [PATCH 2/9] Move AWS EKS attributes to the registry --- docs/attributes-registry/README.md | 1 + docs/attributes-registry/aws-eks.md | 8 ++++++++ docs/resource/cloud-provider/aws/eks.md | 2 +- model/registry/aws-eks.yaml | 13 +++++++++++++ model/resource/cloud_provider/aws/eks.yaml | 9 ++------- 5 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 docs/attributes-registry/aws-eks.md create mode 100644 model/registry/aws-eks.yaml diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index f57e116785..3d7e6e21c6 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -29,6 +29,7 @@ Currently, the following namespaces exist: * [Android](android.md) * [AWS ECS](aws-ecs.md) +* [AWS EKS](aws-eks.md) * [Browser](browser.md) * [Client](client.md) * [Cloud](cloud.md) diff --git a/docs/attributes-registry/aws-eks.md b/docs/attributes-registry/aws-eks.md new file mode 100644 index 0000000000..ddc67e67a2 --- /dev/null +++ b/docs/attributes-registry/aws-eks.md @@ -0,0 +1,8 @@ +# AWS EKS + +## AWS EKS Attributes + +| Attribute | Type | Description | Examples | +|---|---|---|---| +| `aws.eks.cluster.arn` | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | + diff --git a/docs/resource/cloud-provider/aws/eks.md b/docs/resource/cloud-provider/aws/eks.md index 9bc4e42500..891dab94fc 100644 --- a/docs/resource/cloud-provider/aws/eks.md +++ b/docs/resource/cloud-provider/aws/eks.md @@ -9,7 +9,7 @@ | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `aws.eks.cluster.arn` | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | Recommended | +| [`aws.eks.cluster.arn`](../../../attributes-registry/aws-eks.md) | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | Recommended | [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md diff --git a/model/registry/aws-eks.yaml b/model/registry/aws-eks.yaml new file mode 100644 index 0000000000..db59835b0e --- /dev/null +++ b/model/registry/aws-eks.yaml @@ -0,0 +1,13 @@ +groups: + - 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'] diff --git a/model/resource/cloud_provider/aws/eks.yaml b/model/resource/cloud_provider/aws/eks.yaml index 8eafc481aa..a25713cdfd 100644 --- a/model/resource/cloud_provider/aws/eks.yaml +++ b/model/resource/cloud_provider/aws/eks.yaml @@ -1,13 +1,8 @@ groups: - id: aws.eks - prefix: aws.eks type: resource brief: > Resources used by 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'] + - ref: aws.eks.cluster.arn + requirement_level: recommended From e32071454713c50618749137d5619f5bd91434e9 Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:42:45 +0100 Subject: [PATCH 3/9] Move AWS Logs attributes to the registry --- docs/attributes-registry/README.md | 1 + docs/attributes-registry/aws-log.md | 17 ++++++++ docs/resource/cloud-provider/aws/logs.md | 8 ++-- model/registry/aws-log.yaml | 43 ++++++++++++++++++++ model/resource/cloud_provider/aws/logs.yaml | 45 ++++----------------- 5 files changed, 73 insertions(+), 41 deletions(-) create mode 100644 docs/attributes-registry/aws-log.md create mode 100644 model/registry/aws-log.yaml diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index 3d7e6e21c6..d7ddb45410 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -30,6 +30,7 @@ Currently, the following namespaces exist: * [Android](android.md) * [AWS ECS](aws-ecs.md) * [AWS EKS](aws-eks.md) +* [AWS Logs](aws-log.md) * [Browser](browser.md) * [Client](client.md) * [Cloud](cloud.md) diff --git a/docs/attributes-registry/aws-log.md b/docs/attributes-registry/aws-log.md new file mode 100644 index 0000000000..377f2a83d7 --- /dev/null +++ b/docs/attributes-registry/aws-log.md @@ -0,0 +1,17 @@ +# AWS Logs + +## AWS Logs Attributes + +| Attribute | Type | Description | Examples | +|---|---|---|---| +| `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:*]` | +| `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]` | +| `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]` | +| `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]` | + +**[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. + diff --git a/docs/resource/cloud-provider/aws/logs.md b/docs/resource/cloud-provider/aws/logs.md index 6d7606664d..b7079c49c3 100644 --- a/docs/resource/cloud-provider/aws/logs.md +++ b/docs/resource/cloud-provider/aws/logs.md @@ -9,10 +9,10 @@ | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `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 | -| `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 | -| `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 | -| `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 | +| [`aws.log.group.arns`](../../../attributes-registry/aws-log.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 | +| [`aws.log.group.names`](../../../attributes-registry/aws-log.md) | string[] | The name(s) of the AWS log group(s) an application is writing to. [2] | `[/aws/lambda/my-function, opentelemetry-service]` | Recommended | +| [`aws.log.stream.arns`](../../../attributes-registry/aws-log.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 | +| [`aws.log.stream.names`](../../../attributes-registry/aws-log.md) | string[] | The name(s) of the AWS log stream(s) an application is writing to. | `[logs/main/10838bed-421f-43ef-870a-f43feacbbb5b]` | Recommended | **[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). diff --git a/model/registry/aws-log.yaml b/model/registry/aws-log.yaml new file mode 100644 index 0000000000..d06a5d3303 --- /dev/null +++ b/model/registry/aws-log.yaml @@ -0,0 +1,43 @@ +groups: + - 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. diff --git a/model/resource/cloud_provider/aws/logs.yaml b/model/resource/cloud_provider/aws/logs.yaml index 35889e137c..ffd5feb3d4 100644 --- a/model/resource/cloud_provider/aws/logs.yaml +++ b/model/resource/cloud_provider/aws/logs.yaml @@ -1,43 +1,14 @@ groups: - id: aws.log - prefix: aws.log type: resource brief: > Resources specific to Amazon Web Services. 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. + - ref: aws.log.group.names + requirement_level: recommended + - ref: aws.log.group.arns + requirement_level: recommended + - ref: aws.log.stream.names + requirement_level: recommended + - ref: aws.log.stream.arns + requirement_level: recommended From 8aa2af39612a03a219b8f3b59f35e963fe9a927f Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:43:05 +0100 Subject: [PATCH 4/9] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.yaml | 3 +++ .github/ISSUE_TEMPLATE/change_proposal.yaml | 3 +++ .github/ISSUE_TEMPLATE/new-conventions.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 08dca47531..56c87d3275 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -20,6 +20,9 @@ body: # DO NOT manually edit it. # Start semconv area list - area:android + - area:aws-ecs + - area:aws-eks + - area:aws-log - area:browser - area:client - area:cloud diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index edaa3a4a75..886b16151c 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -13,6 +13,9 @@ body: # DO NOT manually edit it. # Start semconv area list - area:android + - area:aws-ecs + - area:aws-eks + - area:aws-log - area:browser - area:client - area:cloud diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 8a72b6bff2..c480eda069 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -22,6 +22,9 @@ body: # DO NOT manually edit it. # Start semconv area list - area:android + - area:aws-ecs + - area:aws-eks + - area:aws-log - area:browser - area:client - area:cloud From 5da9e0e7494f9e1265681bd44391048c52682d99 Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:49:22 +0200 Subject: [PATCH 5/9] Move all to aws file --- docs/attributes-registry/README.md | 4 +- docs/attributes-registry/aws-ecs.md | 21 -- docs/attributes-registry/aws-eks.md | 8 - docs/attributes-registry/aws-log.md | 17 -- docs/attributes-registry/aws.md | 62 +++++ model/registry/aws-ecs.yaml | 59 ----- model/registry/aws-eks.yaml | 13 - model/registry/aws-log.yaml | 43 ---- model/registry/aws.yaml | 354 ++++++++++++++++++++++++++++ 9 files changed, 417 insertions(+), 164 deletions(-) delete mode 100644 docs/attributes-registry/aws-ecs.md delete mode 100644 docs/attributes-registry/aws-eks.md delete mode 100644 docs/attributes-registry/aws-log.md create mode 100644 docs/attributes-registry/aws.md delete mode 100644 model/registry/aws-ecs.yaml delete mode 100644 model/registry/aws-eks.yaml delete mode 100644 model/registry/aws-log.yaml create mode 100644 model/registry/aws.yaml diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md index d7ddb45410..8ab36d9d3b 100644 --- a/docs/attributes-registry/README.md +++ b/docs/attributes-registry/README.md @@ -28,9 +28,7 @@ All registered attributes are listed by namespace in this registry. Currently, the following namespaces exist: * [Android](android.md) -* [AWS ECS](aws-ecs.md) -* [AWS EKS](aws-eks.md) -* [AWS Logs](aws-log.md) +* [AWS](aws.md) * [Browser](browser.md) * [Client](client.md) * [Cloud](cloud.md) diff --git a/docs/attributes-registry/aws-ecs.md b/docs/attributes-registry/aws-ecs.md deleted file mode 100644 index 13e7618cfb..0000000000 --- a/docs/attributes-registry/aws-ecs.md +++ /dev/null @@ -1,21 +0,0 @@ -# AWS ECS - -## AWS ECS Attributes - -| Attribute | Type | Description | Examples | -|---|---|---|---| -| `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` | -| `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` | -| `aws.ecs.launchtype` | string | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `ec2` | -| `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` | -| `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` | -| `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` | -| `aws.ecs.task.revision` | string | The revision for the task definition used to create the ECS task. | `8`; `26` | - -`aws.ecs.launchtype` MUST be one of the following: - -| Value | Description | -|---|---| -| `ec2` | ec2 | -| `fargate` | fargate | - diff --git a/docs/attributes-registry/aws-eks.md b/docs/attributes-registry/aws-eks.md deleted file mode 100644 index ddc67e67a2..0000000000 --- a/docs/attributes-registry/aws-eks.md +++ /dev/null @@ -1,8 +0,0 @@ -# AWS EKS - -## AWS EKS Attributes - -| Attribute | Type | Description | Examples | -|---|---|---|---| -| `aws.eks.cluster.arn` | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | - diff --git a/docs/attributes-registry/aws-log.md b/docs/attributes-registry/aws-log.md deleted file mode 100644 index 377f2a83d7..0000000000 --- a/docs/attributes-registry/aws-log.md +++ /dev/null @@ -1,17 +0,0 @@ -# AWS Logs - -## AWS Logs Attributes - -| Attribute | Type | Description | Examples | -|---|---|---|---| -| `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:*]` | -| `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]` | -| `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]` | -| `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]` | - -**[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. - diff --git a/docs/attributes-registry/aws.md b/docs/attributes-registry/aws.md new file mode 100644 index 0000000000..c7e5c9a513 --- /dev/null +++ b/docs/attributes-registry/aws.md @@ -0,0 +1,62 @@ +# AWS + + + +- [AWS DynamoDB Attributes](#aws-dynamodb-attributes) + + + +## AWS DynamoDB Attributes + +| Attribute | Type | Description | Examples | Stability | +|---|---|---|---|---| +| `aws.dynamodb.attribute_definitions` | string[] | The JSON-serialized value of each item in the `AttributeDefinitions` request field. | `[{ "AttributeName": "string", "AttributeType": "string" }]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.attributes_to_get` | string[] | The value of the `AttributesToGet` request parameter. | `[lives, id]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.consistent_read` | boolean | The value of the `ConsistentRead` request parameter. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.consumed_capacity` | string[] | The JSON-serialized value of each item in the `ConsumedCapacity` response field. | `[{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": "string", "WriteCapacityUnits": number }]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.count` | int | The value of the `Count` response parameter. | `10` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.exclusive_start_table` | string | The value of the `ExclusiveStartTableName` request parameter. | `Users`; `CatsTable` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.global_secondary_index_updates` | string[] | The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. | `[{ "Create": { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.global_secondary_indexes` | string[] | The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field | `[{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.index_name` | string | The value of the `IndexName` request parameter. | `name_to_group` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.item_collection_metrics` | string | The JSON-serialized value of the `ItemCollectionMetrics` response field. | `{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.limit` | int | The value of the `Limit` request parameter. | `10` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.local_secondary_indexes` | string[] | The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. | `[{ "IndexArn": "string", "IndexName": "string", "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.projection` | string | The value of the `ProjectionExpression` request parameter. | `Title`; `Title, Price, Color`; `Title, Description, RelatedItems, ProductReviews` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.provisioned_read_capacity` | double | The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. | `1.0`; `2.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.provisioned_write_capacity` | double | The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. | `1.0`; `2.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.scan_forward` | boolean | The value of the `ScanIndexForward` request parameter. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.scanned_count` | int | The value of the `ScannedCount` response parameter. | `50` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.segment` | int | The value of the `Segment` request parameter. | `10` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aws.dynamodb.select` | string | The value of the `Select` request parameter. | `ALL_ATTRIBUTES`; `COUNT` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `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) | + + +## AWS ECS Attributes + + + +## AWS EKS Attributes + +| Attribute | Type | Description | Examples | +|---|---|---|---| +| `aws.eks.cluster.arn` | string | The ARN of an EKS cluster. | `arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster` | + + +## AWS Logs Attributes + +| Attribute | Type | Description | Examples | +|---|---|---|---| +| `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:*]` | +| `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]` | +| `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]` | +| `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]` | + +**[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. + \ No newline at end of file diff --git a/model/registry/aws-ecs.yaml b/model/registry/aws-ecs.yaml deleted file mode 100644 index c1d2339da7..0000000000 --- a/model/registry/aws-ecs.yaml +++ /dev/null @@ -1,59 +0,0 @@ -groups: - - id: registry.aws.ecs - 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" - - id: fargate - value: "fargate" - 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"] diff --git a/model/registry/aws-eks.yaml b/model/registry/aws-eks.yaml deleted file mode 100644 index db59835b0e..0000000000 --- a/model/registry/aws-eks.yaml +++ /dev/null @@ -1,13 +0,0 @@ -groups: - - 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'] diff --git a/model/registry/aws-log.yaml b/model/registry/aws-log.yaml deleted file mode 100644 index d06a5d3303..0000000000 --- a/model/registry/aws-log.yaml +++ /dev/null @@ -1,43 +0,0 @@ -groups: - - 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. diff --git a/model/registry/aws.yaml b/model/registry/aws.yaml new file mode 100644 index 0000000000..f223e5fa9f --- /dev/null +++ b/model/registry/aws.yaml @@ -0,0 +1,354 @@ +groups: + - id: registry.aws.dynamodb + prefix: aws.dynamodb + type: attribute_group + brief: > + This document defines attributes for AWS DynamoDB. + attributes: + - id: table_names + type: string[] + stability: experimental + brief: The keys in the `RequestItems` object field. + examples: + - Users + - Cats + - id: consumed_capacity + type: string[] + stability: experimental + brief: "The JSON-serialized value of each item in the `ConsumedCapacity` response field." + examples: + - '{ + "CapacityUnits": number, + "GlobalSecondaryIndexes": { + "string" : { + "CapacityUnits": number, + "ReadCapacityUnits": number, + "WriteCapacityUnits": number + } + }, + "LocalSecondaryIndexes": { + "string" : { + "CapacityUnits": number, + "ReadCapacityUnits": number, + "WriteCapacityUnits": number + } + }, + "ReadCapacityUnits": number, + "Table": { + "CapacityUnits": number, + "ReadCapacityUnits": number, + "WriteCapacityUnits": number + }, + "TableName": "string", + "WriteCapacityUnits": number + }' + - id: item_collection_metrics + type: string + stability: experimental + brief: "The JSON-serialized value of the `ItemCollectionMetrics` response field." + examples: + - '{ + "string" : [ + { + "ItemCollectionKey": { + "string" : { + "B": blob, + "BOOL": boolean, + "BS": [ blob ], + "L": [ + "AttributeValue" + ], + "M": { + "string" : "AttributeValue" + }, + "N": "string", + "NS": [ "string" ], + "NULL": boolean, + "S": "string", + "SS": [ "string" ] + } + }, + "SizeEstimateRangeGB": [ number ] + } + ] + }' + - id: provisioned_read_capacity + type: double + stability: experimental + brief: "The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter." + examples: + - 1.0 + - 2.0 + - id: provisioned_write_capacity + type: double + stability: experimental + brief: "The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter." + examples: + - 1.0 + - 2.0 + - id: consistent_read + type: boolean + stability: experimental + brief: "The value of the `ConsistentRead` request parameter." + - id: projection + type: string + stability: experimental + brief: "The value of the `ProjectionExpression` request parameter." + examples: + - Title + - Title, Price, Color + - Title, Description, RelatedItems, ProductReviews + - id: limit + type: int + stability: experimental + brief: "The value of the `Limit` request parameter." + examples: + - 10 + - id: attributes_to_get + type: string[] + stability: experimental + brief: "The value of the `AttributesToGet` request parameter." + examples: + - lives + - id + - id: index_name + type: string + stability: experimental + brief: "The value of the `IndexName` request parameter." + examples: + - name_to_group + - id: select + type: string + stability: experimental + brief: "The value of the `Select` request parameter." + examples: + - ALL_ATTRIBUTES + - COUNT + - id: global_secondary_indexes + type: string[] + stability: experimental + brief: "The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field" + examples: + - '{ + "IndexName": "string", + "KeySchema": [ + { + "AttributeName": "string", + "KeyType": "string" + } + ], + "Projection": { + "NonKeyAttributes": [ "string" ], + "ProjectionType": "string" + }, + "ProvisionedThroughput": { + "ReadCapacityUnits": number, + "WriteCapacityUnits": number + } + }' + - id: local_secondary_indexes + type: string[] + stability: experimental + brief: "The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field." + examples: + - '{ + "IndexArn": "string", + "IndexName": "string", + "IndexSizeBytes": number, + "ItemCount": number, + "KeySchema": [ + { + "AttributeName": "string", + "KeyType": "string" + } + ], + "Projection": { + "NonKeyAttributes": [ "string" ], + "ProjectionType": "string" + } + }' + - id: exclusive_start_table + type: string + stability: experimental + brief: "The value of the `ExclusiveStartTableName` request parameter." + examples: + - Users + - CatsTable + - id: table_count + type: int + stability: experimental + brief: "The number of items in the `TableNames` response parameter." + examples: + - 20 + - id: scan_forward + type: boolean + stability: experimental + brief: "The value of the `ScanIndexForward` request parameter." + - id: segment + type: int + stability: experimental + brief: "The value of the `Segment` request parameter." + examples: + - 10 + - id: total_segments + type: int + stability: experimental + brief: "The value of the `TotalSegments` request parameter." + examples: + - 100 + - id: count + type: int + stability: experimental + brief: "The value of the `Count` response parameter." + examples: + - 10 + - id: scanned_count + type: int + stability: experimental + brief: "The value of the `ScannedCount` response parameter." + examples: + - 50 + - id: attribute_definitions + type: string[] + stability: experimental + brief: "The JSON-serialized value of each item in the `AttributeDefinitions` request field." + examples: + - '{ + "AttributeName": "string", + "AttributeType": "string" + }' + - id: global_secondary_index_updates + type: string[] + stability: experimental + brief: "The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field." + examples: + - '{ + "Create": { + "IndexName": "string", + "KeySchema": [ + { + "AttributeName": "string", + "KeyType": "string" + } + ], + "Projection": { + "NonKeyAttributes": [ "string" ], + "ProjectionType": "string" + }, + "ProvisionedThroughput": { + "ReadCapacityUnits": number, + "WriteCapacityUnits": number + } + }' + - id: registry.aws.ecs + 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" + - id: fargate + value: "fargate" + 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. \ No newline at end of file From c4808f8f0878adbc1045918d4a993f8c52aadf98 Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:54:34 +0200 Subject: [PATCH 6/9] add stability to enum --- model/registry/aws.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/registry/aws.yaml b/model/registry/aws.yaml index f223e5fa9f..10be8965bd 100644 --- a/model/registry/aws.yaml +++ b/model/registry/aws.yaml @@ -264,8 +264,10 @@ groups: 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. From 209c74e2f861d2f6332fda9be43cc693bfadb51c Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:56:18 +0200 Subject: [PATCH 7/9] yamllint --- model/registry/aws.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/registry/aws.yaml b/model/registry/aws.yaml index 10be8965bd..0045056450 100644 --- a/model/registry/aws.yaml +++ b/model/registry/aws.yaml @@ -353,4 +353,4 @@ groups: 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. \ No newline at end of file + group and a log stream. From 129026b1abd0cdf7485fa809ee0d5081f56fd61a Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:30:05 +0200 Subject: [PATCH 8/9] Allow custom enum values --- docs/attributes-registry/android.md | 2 +- docs/attributes-registry/aws.md | 2 +- docs/attributes-registry/ios.md | 2 +- docs/mobile/events.md | 4 ++-- docs/resource/cloud-provider/aws/ecs.md | 2 +- model/registry/android.yaml | 2 +- model/registry/aws.yaml | 2 +- model/registry/ios.yaml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/attributes-registry/android.md b/docs/attributes-registry/android.md index 156f661dc5..f2ca703769 100644 --- a/docs/attributes-registry/android.md +++ b/docs/attributes-registry/android.md @@ -23,7 +23,7 @@ **[1]:** The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. -`android.state` MUST be one of the following: +`android.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | |---|---|---| diff --git a/docs/attributes-registry/aws.md b/docs/attributes-registry/aws.md index dd785c599d..b6fa59ac40 100644 --- a/docs/attributes-registry/aws.md +++ b/docs/attributes-registry/aws.md @@ -49,7 +49,7 @@ | `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: +`aws.ecs.launchtype` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | |---|---|---| diff --git a/docs/attributes-registry/ios.md b/docs/attributes-registry/ios.md index e35fc82b73..e8aea69f54 100644 --- a/docs/attributes-registry/ios.md +++ b/docs/attributes-registry/ios.md @@ -18,7 +18,7 @@ **[1]:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), and from which the `OS terminology` column values are derived. -`ios.state` MUST be one of the following: +`ios.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | |---|---|---| diff --git a/docs/mobile/events.md b/docs/mobile/events.md index 204a8020de..b02760674b 100644 --- a/docs/mobile/events.md +++ b/docs/mobile/events.md @@ -32,7 +32,7 @@ The event name MUST be `device.app.lifecycle`. **[1]:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), and from which the `OS terminology` column values are derived. -`ios.state` MUST be one of the following: +`ios.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | |---|---|---| @@ -54,7 +54,7 @@ The event name MUST be `device.app.lifecycle`. **[1]:** The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. -`android.state` MUST be one of the following: +`android.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | |---|---|---| diff --git a/docs/resource/cloud-provider/aws/ecs.md b/docs/resource/cloud-provider/aws/ecs.md index 5e10e5f4c7..c621699190 100644 --- a/docs/resource/cloud-provider/aws/ecs.md +++ b/docs/resource/cloud-provider/aws/ecs.md @@ -17,7 +17,7 @@ | [`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: +`aws.ecs.launchtype` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | |---|---|---| diff --git a/model/registry/android.yaml b/model/registry/android.yaml index 267ad426b0..bddc74a09a 100644 --- a/model/registry/android.yaml +++ b/model/registry/android.yaml @@ -27,7 +27,7 @@ groups: The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. type: - allow_custom_values: false + allow_custom_values: true members: - id: created value: 'created' diff --git a/model/registry/aws.yaml b/model/registry/aws.yaml index 0045056450..149d82ad7f 100644 --- a/model/registry/aws.yaml +++ b/model/registry/aws.yaml @@ -260,7 +260,7 @@ groups: examples: ['arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'] - id: launchtype type: - allow_custom_values: false + allow_custom_values: true members: - id: ec2 value: "ec2" diff --git a/model/registry/ios.yaml b/model/registry/ios.yaml index 3989b4e8e3..1bfe30f325 100644 --- a/model/registry/ios.yaml +++ b/model/registry/ios.yaml @@ -13,7 +13,7 @@ groups: brief: > This attribute represents the state the application has transitioned into at the occurrence of the event. type: - allow_custom_values: false + allow_custom_values: true members: - id: active value: 'active' From 313614aa0fd6e5f216975a057cdcc381f5026c0e Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Fri, 5 Apr 2024 11:27:37 +0200 Subject: [PATCH 9/9] Empty-Commit