-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add semantic conventions for cloud provider-specific resource attributes #1099
Merged
carlosalberto
merged 9 commits into
open-telemetry:master
from
willarmiros:aws-conventions
Nov 25, 2020
+148
−0
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b158045
proposal for cloud provider-specific resource semantic conventions
9b6c00d
addressed feedback
b8d4c0d
changed log attribs to be string arrays
931024a
pluralized array attribs
ffb068e
Update specification/resource/semantic_conventions/README.md
willarmiros c66f5b1
switched cluster to cluster.arn
8525215
Merge branch 'aws-conventions' of https://github.com/willarmiros/open…
4024bb0
lowercased launch types
bcbd99e
Merge branch 'master' into aws-conventions
willarmiros File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'] | ||
|
38 changes: 38 additions & 0 deletions
38
semantic_conventions/resource/cloud_provider/aws/logs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
groups: | ||
- id: aws.log | ||
prefix: aws.log | ||
brief: > | ||
Resources specific to Amazon Web Services. | ||
attributes: | ||
- id: group.names | ||
type: string[] | ||
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[] | ||
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[] | ||
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[] | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
specification/resource/semantic_conventions/cloud_provider/aws/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
22 changes: 22 additions & 0 deletions
22
specification/resource/semantic_conventions/cloud_provider/aws/ecs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# AWS ECS | ||
|
||
**type:** `aws.ecs` | ||
|
||
**Description:** Resources used by AWS Elastic Container Service (ECS). | ||
|
||
<!-- semconv aws.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`<br>`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 | | ||
<!-- endsemconv --> |
20 changes: 20 additions & 0 deletions
20
specification/resource/semantic_conventions/cloud_provider/aws/logs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# AWS Logs | ||
|
||
**Type:** `aws.log` | ||
|
||
**Description:** Log attributes for Amazon Web Services. | ||
|
||
<!-- semconv aws.log --> | ||
| Attribute | Type | Description | Example | Required | | ||
|---|---|---|---|---| | ||
| `aws.log.group.names` | string[] | The name(s) of the AWS log group(s) an application is writing to. [1] | `/aws/lambda/my-function`<br>`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 these ARNs necessarily identify both a log group and a log stream. | ||
<!-- endsemconv --> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄