Skip to content
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

added cloud.infrastructure_service attribute to resource spec #1112

Merged
merged 15 commits into from
Jan 7, 2021
Merged
52 changes: 52 additions & 0 deletions semantic_conventions/resource/cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,55 @@ groups:
note: >
In AWS, this is called availability-zone.
examples: ['us-central1-a']
- id: infrastructure.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry my PR suggestion was in the wrong place - should have renamed here and then regenerated the md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh duh, will fix

type:
allow_custom_values: true
members:
- id: EC2
value: 'EC2'
brief: AWS Elastic Compute Cloud
- id: ECS
value: 'ECS'
brief: AWS Elastic Container Service
- id: EKS
value: 'EKS'
brief: AWS Elastic Kubernetes Service
- id: Lambda
value: 'Lambda'
brief: AWS Lambda
- id: ElasticBeanstalk
value: 'ElasticBeanstalk'
brief: AWS Elastic Beanstalk
- id: VM
value: 'VM'
brief: Azure Virtual Machines
- id: ContainerInstances
value: 'ContainerInstances'
brief: Azure Container Instances
- id: AKS
value: 'AKS'
brief: Azure Kubernetes Service
arminru marked this conversation as resolved.
Show resolved Hide resolved
- id: Functions
value: 'Functions'
brief: Azure Functions
- id: AppService
value: 'AppService'
brief: Azure App Service
- id: ComputeEngine
value: 'ComputeEngine'
brief: GCP Compute Engine
- id: CloudRun
value: 'CloudRun'
brief: GCP Cloud Run
- id: GKE
value: 'GKE'
brief: Google Kubernetes Engine
- id: CloudFunctions
value: 'CloudFunctions'
brief: GCP Cloud Functions
- id: AppEngine
value: 'AppEngine'
brief: GCP App Engine
brief: >
The cloud infrastructure resource in use.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a note that the service should (must?) match cloud.provider.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went with should - we allow for custom values so that other cloud providers besides the 3 we enumerate can be referenced, and we can't really control what people would call those infrastructure_services.

examples: ['EC2', 'VM', 'ComputeEngine']
21 changes: 21 additions & 0 deletions specification/resource/semantic_conventions/cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| `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 | The cloud infrastructure resource in use. | `EC2`<br>`VM`<br>`ComputeEngine` | No |

**[1]:** In AWS, this is called availability-zone.

Expand All @@ -21,4 +22,24 @@
| `aws` | Amazon Web Services |
| `azure` | Microsoft Azure |
| `gcp` | Google Cloud Platform |

`cloud.infrastructure.service` MUST be one of the following or, if none of the listed values apply, a custom value:
willarmiros marked this conversation as resolved.
Show resolved Hide resolved

| Value | Description |
|---|---|
| `EC2` | AWS Elastic Compute Cloud |
| `ECS` | AWS Elastic Container Service |
| `EKS` | AWS Elastic Kubernetes Service |
| `Lambda` | AWS Lambda |
| `ElasticBeanstalk` | AWS Elastic Beanstalk |
| `VM` | Azure Virtual Machines |
| `ContainerInstances` | Azure Container Instances |
| `AKS` | Azure Kubernetes Service |
| `Functions` | Azure Functions |
| `AppService` | Azure App Service |
| `ComputeEngine` | GCP Compute Engine |
| `CloudRun` | GCP Cloud Run |
| `GKE` | Google Kubernetes Engine |
| `CloudFunctions` | GCP Cloud Functions |
| `AppEngine` | GCP App Engine |
<!-- endsemconv -->