func GetInstanceID(ctx context.Context) (string, error) {
	if !config.IsCloudProviderEnabled(CloudProviderName) {
		return "", fmt.Errorf("cloud provider is disabled by configuration")
	}
	res, err := getMetadataItemWithMaxLength(ctx, metadataURL+"/meta-data/instance-id", config.Datadog.GetInt("metadata_endpoints_max_hostname_size"))
	if err != nil {
		return "", fmt.Errorf("unable to get TencentCloud CVM instanceID: %s", err)
	}
	return res, err
}
// GetInstanceID fetches the instance id for current host from the Tencent metadata API
GetInstanceID fetches the instance id for current host from the Tencent metadata API
// GetInstanceID fetches the instance id for current host from the Tencent metadata API
func GetInstanceID(ctx context.Context) (string, error) {
	if !config.IsCloudProviderEnabled(CloudProviderName) {
		return "", fmt.Errorf("cloud provider is disabled by configuration")
	}
	res, err := getMetadataItemWithMaxLength(ctx, metadataURL+"/meta-data/instance-id", config.Datadog.GetInt("metadata_endpoints_max_hostname_size"))
	if err != nil {
		return "", fmt.Errorf("unable to get TencentCloud CVM instanceID: %s", err)
	}
	return res, err
}
func GetInstanceID ( ctx context . Context ) ( string , error ) { if ! config . IsCloudProviderEnabled ( CloudProviderName ) { return " " , fmt . Errorf ( " " ) } res , err := getMetadataItemWithMaxLength ( ctx , metadataURL + " " , config . Datadog . GetInt ( " " ) ) if err != nil { return " " , fmt . Errorf ( " " , err ) } return res , err }
GetInstanceID fetches the instance id for current host from the Tencent metadata API
GetInstanceID fetches the instance id for current host from the Tencent metadata API