Class CloudResource
java.lang.Object
io.opencensus.contrib.resource.util.CloudResource
Helper class for Cloud
Resource
environment.- Since:
- 0.20
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Key for the cloud account id used to identify different entities.static final String
The value of the provider when running in AWS.static final String
The value of the provider when running in AZURE.static final String
The value of the provider when running in GCP.static final String
Key for the name of the cloud provider.static final String
Key for the region in which entities are running.static final String
The type of thisResource
.static final String
Key for the zone in which entities are running. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TYPE
The type of thisResource
.- Since:
- 0.20
- See Also:
-
PROVIDER_KEY
Key for the name of the cloud provider. Example values are aws, azure, gcp.- Since:
- 0.20
- See Also:
-
PROVIDER_AWS
The value of the provider when running in AWS.- Since:
- 0.20
- See Also:
-
PROVIDER_AZURE
The value of the provider when running in AZURE.- Since:
- 0.20
- See Also:
-
PROVIDER_GCP
The value of the provider when running in GCP.- Since:
- 0.20
- See Also:
-
ACCOUNT_ID_KEY
Key for the cloud account id used to identify different entities.- Since:
- 0.20
- See Also:
-
REGION_KEY
Key for the region in which entities are running.- Since:
- 0.20
- See Also:
-
ZONE_KEY
Key for the zone in which entities are running.- Since:
- 0.20
- See Also:
-
-
Constructor Details
-
CloudResource
private CloudResource()
-
-
Method Details
-
create
Returns aResource
that describes a cloud environment.- Parameters:
provider
- the name of the cloud provider.accountId
- the cloud account id used to identify different entities.region
- the region in which entities are running.zone
- the zone in which entities are running.- Returns:
- a
Resource
that describes a aws ec2 instance. - Since:
- 0.20
-
detect
-