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 StringKey for the cloud account id used to identify different entities.static final StringThe value of the provider when running in AWS.static final StringThe value of the provider when running in AZURE.static final StringThe value of the provider when running in GCP.static final StringKey for the name of the cloud provider.static final StringKey for the region in which entities are running.static final StringThe type of thisResource.static final StringKey for the zone in which entities are running. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TYPE
-
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 aResourcethat 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
Resourcethat describes a aws ec2 instance. - Since:
- 0.20
-
detect
-