From b158045644902b7d84d8dd9254414f49f2673ef9 Mon Sep 17 00:00:00 2001 From: William Armiros Date: Thu, 15 Oct 2020 13:42:24 -0600 Subject: [PATCH 1/7] proposal for cloud provider-specific resource semantic conventions --- semantic_conventions/resource/cloud.yaml | 11 +++++- .../resource/cloud_provider/aws/aws.yaml | 34 +++++++++++++++++ .../resource/cloud_provider/aws/ecs.yaml | 38 +++++++++++++++++++ .../resource/semantic_conventions/README.md | 6 +++ .../resource/semantic_conventions/cloud.md | 5 ++- .../cloud_provider/aws/aws.md | 18 +++++++++ .../cloud_provider/aws/ecs.md | 22 +++++++++++ 7 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 semantic_conventions/resource/cloud_provider/aws/aws.yaml create mode 100644 semantic_conventions/resource/cloud_provider/aws/ecs.yaml create mode 100644 specification/resource/semantic_conventions/cloud_provider/aws/aws.md create mode 100644 specification/resource/semantic_conventions/cloud_provider/aws/ecs.md diff --git a/semantic_conventions/resource/cloud.yaml b/semantic_conventions/resource/cloud.yaml index 207baec0382..749a41702e2 100644 --- a/semantic_conventions/resource/cloud.yaml +++ b/semantic_conventions/resource/cloud.yaml @@ -13,7 +13,7 @@ groups: brief: 'Amazon Web Services' - id: Azure value: 'azure' - brief: 'Amazon Web Services' + brief: 'Microsoft Azure' - id: GCP value: 'gcp' brief: 'Google Cloud Platform' @@ -37,3 +37,12 @@ groups: note: > In AWS, this is called availability-zone. examples: ['us-central1-a'] + - id: infrastructure.service + type: string + brief: > + Description of cloud resource in use. + note: > + The first entry should generally be a cloud provider, followed by a product + category, then finally a particular piece of compute infrastructure. Each entry + is delimited by a double colon (::). + examples: ['AWS::EC2::Instance', 'Azure::Compute::VM', 'GCP::ComputeEngine::VM'] diff --git a/semantic_conventions/resource/cloud_provider/aws/aws.yaml b/semantic_conventions/resource/cloud_provider/aws/aws.yaml new file mode 100644 index 00000000000..c952b450965 --- /dev/null +++ b/semantic_conventions/resource/cloud_provider/aws/aws.yaml @@ -0,0 +1,34 @@ +groups: + - id: aws + prefix: aws + brief: > + Resources specific to Amazon Web Services. + attributes: + - id: loggroup.name + type: string + brief: > + The name of the AWS log group an application is writing to. + examples: ['/aws/lambda/my-function', 'opentelemetry-service'] + - id: loggroup.arn + type: string + brief: > + The Amazon Resource Name (ARN) of an AWS log group. + 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: logstream.name + type: string + brief: > + The name of the AWS log stream an application is writing to. + examples: ['logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'] + - id: logstream.arn + type: string + brief: > + The ARN of the AWS log stream. + 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 this ARN necessarily identifies both a log + group and a log stream. diff --git a/semantic_conventions/resource/cloud_provider/aws/ecs.yaml b/semantic_conventions/resource/cloud_provider/aws/ecs.yaml new file mode 100644 index 00000000000..ce5b6134c54 --- /dev/null +++ b/semantic_conventions/resource/cloud_provider/aws/ecs.yaml @@ -0,0 +1,38 @@ +groups: + - id: aws.ecs + prefix: aws.ecs + brief: > + Resources used by AWS Elastic Container Service (ECS). + attributes: + - id: container.arn + type: string + brief: > + The 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 + type: string + brief: > + The name of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + examples: ['opentelemetry-cluster'] + - id: launchtype + type: + allow_custom_values: false + members: + - id: EC2 + value: "EC2" + - id: Fargate + value: "Fargate" + brief: > + The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + examples: ['EC2', 'Fargate'] + - 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'] + - id: task.family + type: string + brief: > + The task definition family this task definition is a member of. + examples: ['opentelemetry-family'] + diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index a7073284046..ebde4233f98 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -135,3 +135,9 @@ Attributes defining a running environment (e.g. Operating System, Cloud, Data Ce Version attributes, such as `service.version`, are values of type `string`. They are the exact version used to identify an artifact. This may be a semantic version, e.g., `1.2.3`, git hash, e.g., `8ae73a`, or an arbitrary version string, e.g., `0.1.2.20210101`, whatever was used when building the artifact. + +## Provider-Specific Attributes + +Attributes that are only applicable to resources from a specific cloud provider. Currently, these +resources can only be defined for providers listed as a valid `cloud.provider` in +[Cloud](./cloud.md). Provider-specific attributes all reside in the `cloud_provider` directory. diff --git a/specification/resource/semantic_conventions/cloud.md b/specification/resource/semantic_conventions/cloud.md index f755a8dceb5..790a732d81e 100644 --- a/specification/resource/semantic_conventions/cloud.md +++ b/specification/resource/semantic_conventions/cloud.md @@ -11,14 +11,17 @@ | `cloud.account.id` | string | The cloud account ID used to identify different entities. | `opentelemetry` | No | | `cloud.region` | string | A specific geographical location where different entities can run. | `us-central1` | No | | `cloud.zone` | string | Zones are a sub set of the region connected through low-latency links. [1] | `us-central1-a` | No | +| `cloud.infrastructure.service` | string | Description of cloud resource in use. [2] | `AWS::EC2::Instance`
`Azure::Compute::VM`
`GCP::ComputeEngine::VM` | No | **[1]:** In AWS, this is called availability-zone. +**[2]:** The first entry should generally be a cloud provider, followed by a product category, then finally a particular piece of compute infrastructure. Each entry is delimited by a double colon (::). + `cloud.provider` MUST be one of the following or, if none of the listed values apply, a custom value: | Value | Description | |---|---| | `aws` | Amazon Web Services | -| `azure` | Amazon Web Services | +| `azure` | Microsoft Azure | | `gcp` | Google Cloud Platform | diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/aws.md b/specification/resource/semantic_conventions/cloud_provider/aws/aws.md new file mode 100644 index 00000000000..e4067697917 --- /dev/null +++ b/specification/resource/semantic_conventions/cloud_provider/aws/aws.md @@ -0,0 +1,18 @@ +# AWS + +**Type:** `aws` + +**Description:** Resources specific to Amazon Web Services. + + +| Attribute | Type | Description | Example | Required | +|---|---|---|---|---| +| `aws.loggroup.name` | string | The name of the AWS log group an application is writing to. | `/aws/lambda/my-function`
`opentelemetry-service` | No | +| `aws.loggroup.arn` | string | The Amazon Resource Name (ARN) of an AWS log group. [1] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | +| `aws.logstream.name` | string | The name of the AWS log stream an application is writing to. | `logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | +| `aws.logstream.arn` | string | The ARN of the AWS log stream. [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | + +**[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]:** 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 this ARN necessarily identifies both a log group and a log stream. + diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md new file mode 100644 index 00000000000..a39e01479d1 --- /dev/null +++ b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md @@ -0,0 +1,22 @@ +# AWS ECS + +**type:** `aws.ecs` + +**Description:** Resources used by AWS Elastic Container Service (ECS). + + +| Attribute | Type | Description | Example | Required | +|---|---|---|---|---| +| `aws.ecs.container.arn` | string | The 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` | No | +| `aws.ecs.cluster` | string | The name of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). | `opentelemetry-cluster` | No | +| `aws.ecs.launchtype` | string enum | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `EC2`
`Fargate` | No | +| `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` | No | +| `aws.ecs.task.family` | string | The task definition family this task definition is a member of. | `opentelemetry-family` | No | + +`aws.ecs.launchtype` MUST be one of the following: + +| Value | Description | +|---|---| +| `EC2` | EC2 | +| `Fargate` | Fargate | + From 9b6c00dd7284beefe0d1c65f9a28e03c170442bb Mon Sep 17 00:00:00 2001 From: William Armiros Date: Mon, 19 Oct 2020 11:19:55 -0600 Subject: [PATCH 2/7] addressed feedback --- semantic_conventions/resource/cloud.yaml | 9 --------- .../aws/{aws.yaml => logs.yaml} | 12 ++++++------ .../resource/semantic_conventions/README.md | 9 +++++++-- .../resource/semantic_conventions/cloud.md | 3 --- .../cloud_provider/aws/README.md | 19 +++++++++++++++++++ .../cloud_provider/aws/aws.md | 18 ------------------ .../cloud_provider/aws/logs.md | 18 ++++++++++++++++++ 7 files changed, 50 insertions(+), 38 deletions(-) rename semantic_conventions/resource/cloud_provider/aws/{aws.yaml => logs.yaml} (91%) create mode 100644 specification/resource/semantic_conventions/cloud_provider/aws/README.md delete mode 100644 specification/resource/semantic_conventions/cloud_provider/aws/aws.md create mode 100644 specification/resource/semantic_conventions/cloud_provider/aws/logs.md diff --git a/semantic_conventions/resource/cloud.yaml b/semantic_conventions/resource/cloud.yaml index 749a41702e2..d7672577a3c 100644 --- a/semantic_conventions/resource/cloud.yaml +++ b/semantic_conventions/resource/cloud.yaml @@ -37,12 +37,3 @@ groups: note: > In AWS, this is called availability-zone. examples: ['us-central1-a'] - - id: infrastructure.service - type: string - brief: > - Description of cloud resource in use. - note: > - The first entry should generally be a cloud provider, followed by a product - category, then finally a particular piece of compute infrastructure. Each entry - is delimited by a double colon (::). - examples: ['AWS::EC2::Instance', 'Azure::Compute::VM', 'GCP::ComputeEngine::VM'] diff --git a/semantic_conventions/resource/cloud_provider/aws/aws.yaml b/semantic_conventions/resource/cloud_provider/aws/logs.yaml similarity index 91% rename from semantic_conventions/resource/cloud_provider/aws/aws.yaml rename to semantic_conventions/resource/cloud_provider/aws/logs.yaml index c952b450965..bdb2f1dadff 100644 --- a/semantic_conventions/resource/cloud_provider/aws/aws.yaml +++ b/semantic_conventions/resource/cloud_provider/aws/logs.yaml @@ -1,15 +1,15 @@ groups: - - id: aws - prefix: aws + - id: aws.log + prefix: aws.log brief: > Resources specific to Amazon Web Services. attributes: - - id: loggroup.name + - id: group.name type: string brief: > The name of the AWS log group an application is writing to. examples: ['/aws/lambda/my-function', 'opentelemetry-service'] - - id: loggroup.arn + - id: group.arn type: string brief: > The Amazon Resource Name (ARN) of an AWS log group. @@ -17,12 +17,12 @@ groups: 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: logstream.name + - id: stream.name type: string brief: > The name of the AWS log stream an application is writing to. examples: ['logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'] - - id: logstream.arn + - id: stream.arn type: string brief: > The ARN of the AWS log stream. diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index ebde4233f98..9c80b2e3e6b 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -136,8 +136,13 @@ Version attributes, such as `service.version`, are values of type `string`. They the exact version used to identify an artifact. This may be a semantic version, e.g., `1.2.3`, git hash, e.g., `8ae73a`, or an arbitrary version string, e.g., `0.1.2.20210101`, whatever was used when building the artifact. -## Provider-Specific Attributes +## Cloud-Provider-Specific Attributes Attributes that are only applicable to resources from a specific cloud provider. Currently, these resources can only be defined for providers listed as a valid `cloud.provider` in -[Cloud](./cloud.md). Provider-specific attributes all reside in the `cloud_provider` directory. +[Cloud](./cloud.md) and below. Provider-specific attributes all reside in the `cloud_provider` directory. +Valid cloud providers are: + +- [Amazon Web Services](https://aws.amazon.com/) (`aws`) +- [Google Cloud Platform](https://cloud.google.com/) (`gcp`) +- [Microsoft Azure](https://azure.microsoft.com/) (`azure`) diff --git a/specification/resource/semantic_conventions/cloud.md b/specification/resource/semantic_conventions/cloud.md index 790a732d81e..4dccffaf353 100644 --- a/specification/resource/semantic_conventions/cloud.md +++ b/specification/resource/semantic_conventions/cloud.md @@ -11,12 +11,9 @@ | `cloud.account.id` | string | The cloud account ID used to identify different entities. | `opentelemetry` | No | | `cloud.region` | string | A specific geographical location where different entities can run. | `us-central1` | No | | `cloud.zone` | string | Zones are a sub set of the region connected through low-latency links. [1] | `us-central1-a` | No | -| `cloud.infrastructure.service` | string | Description of cloud resource in use. [2] | `AWS::EC2::Instance`
`Azure::Compute::VM`
`GCP::ComputeEngine::VM` | No | **[1]:** In AWS, this is called availability-zone. -**[2]:** The first entry should generally be a cloud provider, followed by a product category, then finally a particular piece of compute infrastructure. Each entry is delimited by a double colon (::). - `cloud.provider` MUST be one of the following or, if none of the listed values apply, a custom value: | Value | Description | diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/README.md b/specification/resource/semantic_conventions/cloud_provider/aws/README.md new file mode 100644 index 00000000000..136037065b3 --- /dev/null +++ b/specification/resource/semantic_conventions/cloud_provider/aws/README.md @@ -0,0 +1,19 @@ +# AWS Semantic Conventions + +This directory defines standards for resource attributes that only apply to Amazon +Web Services (AWS) resources. If an attribute could apply to resources from more than one cloud +provider (like account ID, operating system, etc), it belongs in the parent +`semantic_conventions` directory. + +## Generic AWS Attributes + +Attributes that relate to AWS or use AWS-specific terminology, but are used by several +services within AWS or are abstracted away from any particular service: + +- [AWS Logs](./logs.md) + +## Services + +Attributes that relate to an individual AWS service: + +- [Elastic Container Service](./ecs.md) diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/aws.md b/specification/resource/semantic_conventions/cloud_provider/aws/aws.md deleted file mode 100644 index e4067697917..00000000000 --- a/specification/resource/semantic_conventions/cloud_provider/aws/aws.md +++ /dev/null @@ -1,18 +0,0 @@ -# AWS - -**Type:** `aws` - -**Description:** Resources specific to Amazon Web Services. - - -| Attribute | Type | Description | Example | Required | -|---|---|---|---|---| -| `aws.loggroup.name` | string | The name of the AWS log group an application is writing to. | `/aws/lambda/my-function`
`opentelemetry-service` | No | -| `aws.loggroup.arn` | string | The Amazon Resource Name (ARN) of an AWS log group. [1] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | -| `aws.logstream.name` | string | The name of the AWS log stream an application is writing to. | `logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | -| `aws.logstream.arn` | string | The ARN of the AWS log stream. [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | - -**[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]:** 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 this ARN necessarily identifies both a log group and a log stream. - diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md new file mode 100644 index 00000000000..c7f3f577b19 --- /dev/null +++ b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md @@ -0,0 +1,18 @@ +# AWS Logs + +**Type:** `aws.log` + +**Description:** Log attributes for Amazon Web Services. + + +| Attribute | Type | Description | Example | Required | +|---|---|---|---|---| +| `aws.log.group.name` | string | The name of the AWS log group an application is writing to. | `/aws/lambda/my-function`
`opentelemetry-service` | No | +| `aws.log.group.arn` | string | The Amazon Resource Name (ARN) of an AWS log group. [1] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | +| `aws.log.stream.name` | string | The name of the AWS log stream an application is writing to. | `logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | +| `aws.log.stream.arn` | string | The ARN of the AWS log stream. [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | + +**[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]:** 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 this ARN necessarily identifies both a log group and a log stream. + From b8d4c0d99329daef2d5706a93b8f4eae1ae624e8 Mon Sep 17 00:00:00 2001 From: William Armiros Date: Mon, 19 Oct 2020 15:34:48 -0600 Subject: [PATCH 3/7] changed log attribs to be string arrays --- .../resource/cloud_provider/aws/logs.yaml | 20 +++++++++++-------- .../cloud_provider/aws/logs.md | 14 +++++++------ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/semantic_conventions/resource/cloud_provider/aws/logs.yaml b/semantic_conventions/resource/cloud_provider/aws/logs.yaml index bdb2f1dadff..d7ad7c3822a 100644 --- a/semantic_conventions/resource/cloud_provider/aws/logs.yaml +++ b/semantic_conventions/resource/cloud_provider/aws/logs.yaml @@ -5,27 +5,31 @@ groups: Resources specific to Amazon Web Services. attributes: - id: group.name - type: string + type: string[] brief: > - The name of the AWS log group an application is writing to. + The name of the AWS log groups 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.arn - type: string + type: string[] brief: > - The Amazon Resource Name (ARN) of an AWS log group. + The Amazon Resource Names (ARN) of the AWS log groups. 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.name - type: string + type: string[] brief: > - The name of the AWS log stream an application is writing to. + The name of the AWS log streams an application is writing to. examples: ['logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'] - id: stream.arn - type: string + type: string[] brief: > - The ARN of the AWS log stream. + The ARNs of the AWS log streams. 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 diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md index c7f3f577b19..c4d3662f9c9 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md @@ -7,12 +7,14 @@ | Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `aws.log.group.name` | string | The name of the AWS log group an application is writing to. | `/aws/lambda/my-function`
`opentelemetry-service` | No | -| `aws.log.group.arn` | string | The Amazon Resource Name (ARN) of an AWS log group. [1] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | -| `aws.log.stream.name` | string | The name of the AWS log stream an application is writing to. | `logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | -| `aws.log.stream.arn` | string | The ARN of the AWS log stream. [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | +| `aws.log.group.name` | string[] | The name of the AWS log groups an application is writing to. [1] | `/aws/lambda/my-function`
`opentelemetry-service` | No | +| `aws.log.group.arn` | string[] | The Amazon Resource Names (ARN) of the AWS log groups. [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | +| `aws.log.stream.name` | string[] | The name of the AWS log streams an application is writing to. | `logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | +| `aws.log.stream.arn` | string[] | The ARNs of the AWS log streams. [3] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | -**[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). +**[1]:** 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. -**[2]:** 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 this ARN necessarily identifies both a log group and a log stream. +**[2]:** See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + +**[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 this ARN necessarily identifies both a log group and a log stream. From 931024abbe68d3a9a6e5b2f1eb74a697cd825954 Mon Sep 17 00:00:00 2001 From: William Armiros Date: Wed, 21 Oct 2020 10:51:42 -0600 Subject: [PATCH 4/7] pluralized array attribs --- .../resource/cloud_provider/aws/logs.yaml | 18 +++++++++--------- .../cloud_provider/aws/logs.md | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/semantic_conventions/resource/cloud_provider/aws/logs.yaml b/semantic_conventions/resource/cloud_provider/aws/logs.yaml index d7ad7c3822a..d437f2fe75d 100644 --- a/semantic_conventions/resource/cloud_provider/aws/logs.yaml +++ b/semantic_conventions/resource/cloud_provider/aws/logs.yaml @@ -4,35 +4,35 @@ groups: brief: > Resources specific to Amazon Web Services. attributes: - - id: group.name + - id: group.names type: string[] brief: > - The name of the AWS log groups an application is writing to. + 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.arn + - id: group.arns type: string[] brief: > - The Amazon Resource Names (ARN) of the AWS log groups. + 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.name + - id: stream.names type: string[] brief: > - The name of the AWS log streams an application is writing to. + The name(s) of the AWS log stream(s) an application is writing to. examples: ['logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'] - - id: stream.arn + - id: stream.arns type: string[] brief: > - The ARNs of the AWS log streams. + 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 this ARN necessarily identifies both a log + One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md index c4d3662f9c9..5973349ea26 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/logs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/logs.md @@ -7,14 +7,14 @@ | Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `aws.log.group.name` | string[] | The name of the AWS log groups an application is writing to. [1] | `/aws/lambda/my-function`
`opentelemetry-service` | No | -| `aws.log.group.arn` | string[] | The Amazon Resource Names (ARN) of the AWS log groups. [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | -| `aws.log.stream.name` | string[] | The name of the AWS log streams an application is writing to. | `logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | -| `aws.log.stream.arn` | string[] | The ARNs of the AWS log streams. [3] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b` | No | +| `aws.log.group.names` | string[] | The name(s) of the AWS log group(s) an application is writing to. [1] | `/aws/lambda/my-function`
`opentelemetry-service` | No | +| `aws.log.group.arns` | string[] | The Amazon Resource Name(s) (ARN) of the AWS log group(s). [2] | `arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*` | No | +| `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` | No | +| `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` | No | **[1]:** 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. **[2]:** See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). -**[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 this ARN necessarily identifies both a log group and a log stream. +**[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. From ffb068e53bd4d9b045850d71281e6aeb8a2ee466 Mon Sep 17 00:00:00 2001 From: William Armiros <54150514+willarmiros@users.noreply.github.com> Date: Thu, 22 Oct 2020 09:43:48 -0600 Subject: [PATCH 5/7] Update specification/resource/semantic_conventions/README.md Co-authored-by: Giovanni Liva --- specification/resource/semantic_conventions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index 9c80b2e3e6b..24b98e93952 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -143,6 +143,6 @@ resources can only be defined for providers listed as a valid `cloud.provider` i [Cloud](./cloud.md) and below. Provider-specific attributes all reside in the `cloud_provider` directory. Valid cloud providers are: -- [Amazon Web Services](https://aws.amazon.com/) (`aws`) +- [Amazon Web Services](https://aws.amazon.com/) ([`aws`](cloud_provider/aws/README.md)) - [Google Cloud Platform](https://cloud.google.com/) (`gcp`) - [Microsoft Azure](https://azure.microsoft.com/) (`azure`) From c66f5b13a9c92ea475a20a5dbcfc24833e2c3891 Mon Sep 17 00:00:00 2001 From: William Armiros Date: Wed, 28 Oct 2020 14:01:26 -0600 Subject: [PATCH 6/7] switched cluster to cluster.arn --- semantic_conventions/resource/cloud_provider/aws/ecs.yaml | 8 ++++---- .../semantic_conventions/cloud_provider/aws/ecs.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/semantic_conventions/resource/cloud_provider/aws/ecs.yaml b/semantic_conventions/resource/cloud_provider/aws/ecs.yaml index ce5b6134c54..5746e16a30c 100644 --- a/semantic_conventions/resource/cloud_provider/aws/ecs.yaml +++ b/semantic_conventions/resource/cloud_provider/aws/ecs.yaml @@ -7,13 +7,13 @@ groups: - id: container.arn type: string brief: > - The ARN of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + 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 + - id: cluster.arn type: string brief: > - The name of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - examples: ['opentelemetry-cluster'] + 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 diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md index a39e01479d1..a69d9972fd0 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md @@ -7,8 +7,8 @@ | Attribute | Type | Description | Example | Required | |---|---|---|---|---| -| `aws.ecs.container.arn` | string | The 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` | No | -| `aws.ecs.cluster` | string | The name of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). | `opentelemetry-cluster` | No | +| `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` | No | +| `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` | No | | `aws.ecs.launchtype` | string enum | The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. | `EC2`
`Fargate` | No | | `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` | No | | `aws.ecs.task.family` | string | The task definition family this task definition is a member of. | `opentelemetry-family` | No | From 4024bb0b9d8790ff3718064940e5c557bcfff661 Mon Sep 17 00:00:00 2001 From: William Armiros Date: Thu, 29 Oct 2020 17:48:05 -0600 Subject: [PATCH 7/7] lowercased launch types --- semantic_conventions/resource/cloud_provider/aws/ecs.yaml | 4 ++-- .../resource/semantic_conventions/cloud_provider/aws/ecs.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/semantic_conventions/resource/cloud_provider/aws/ecs.yaml b/semantic_conventions/resource/cloud_provider/aws/ecs.yaml index 5746e16a30c..543639c4c81 100644 --- a/semantic_conventions/resource/cloud_provider/aws/ecs.yaml +++ b/semantic_conventions/resource/cloud_provider/aws/ecs.yaml @@ -18,9 +18,9 @@ groups: type: allow_custom_values: false members: - - id: EC2 + - id: ec2 value: "EC2" - - id: Fargate + - id: fargate value: "Fargate" brief: > The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. diff --git a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md index a69d9972fd0..37422d2c111 100644 --- a/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md +++ b/specification/resource/semantic_conventions/cloud_provider/aws/ecs.md @@ -17,6 +17,6 @@ | Value | Description | |---|---| -| `EC2` | EC2 | -| `Fargate` | Fargate | +| `EC2` | ec2 | +| `Fargate` | fargate |