我准备用这些Stackdriver API金跟踪BigQuery的使用情况和存在设置此功能的一个很好的教程在这里.但是,此处的查询使用API 的弃用v1,并且可用文档仍然适用于v1.
在BigQuery控制台中,v2仅提供以下字段:
logName timestamp severity insertId resource resource.type resource.labels resource.labels.project_id httpRequest httpRequest.requestMethod httpRequest.requestUrl httpRequest.requestSize httpRequest.status httpRequest.responseSize httpRequest.userAgent httpRequest.remoteIp httpRequest.serverIp httpRequest.referer httpRequest.cacheHit httpRequest.cacheValidatedWithOriginServer httpRequest.latency httpRequest.cacheLookup httpRequest.cacheFillBytes operation operation.id operation.producer operation.first operation.last protopayload_google_cloud_audit_auditlog protopayload_google_cloud_audit_auditlog.serviceName protopayload_google_cloud_audit_auditlog.methodName protopayload_google_cloud_audit_auditlog.resourceName protopayload_google_cloud_audit_auditlog.numResponseItems protopayload_google_cloud_audit_auditlog.status protopayload_google_cloud_audit_auditlog.status.code protopayload_google_cloud_audit_auditlog.status.message trace sourceLocation sourceLocation.file sourceLocation.line sourceLocation.function
现在没有totalBilledBytes字段,在示例v1查询中用于计算使用情况.如何使用API的v2查询使用成本?