-
Notifications
You must be signed in to change notification settings - Fork 653
Description
Consider adding in some instrumentation directly into gcloud libraries (not just gcloud-node) that once enabled, would emit debug telemetry to cloud logging, cloud trace or error reporting service.
I understand that customers should be able to enable verbose logging locally but thought that there might be some way to utilize our gcp services to give 'hints' to customers about repeated issues (i.,e access_token problems, quota exceeded errors, permissions).
The quota errors (per min or daily) is the one that comes to mind...in addition to anyway we can detect if the specific library isn't being 'used' correctly (eg. repeated bigquery single inserts vs batch; i know, it'll likely requires some stateful knowledge which'd make it difficult or not feasible or maybe its better detected GCP/cloud-side). Or if we even send info about gcloud libraries themselves (i.,e remote client is using a dated gclod-* library, etc).
I look at it as a way to bake in a 'crash report' system or our ubiquitous 'send usage statistics to google' capability directly into a client library we curated. If this is feasible, it makes using gcloud-* libraries even more useful (not only do you get an easy-to-use api, but we'll also help you along in troubleshooting and provide hints at optimizing...).
For reference from the source discussion:
"Regarding Error Reporting, the goal should be that as soon as a developer imports a gcloud library, unhandled exceptions are forwarded to Stackdriver Error Reporting. No specific code instrumentation required.
This is what the cloud-errors-nodejs module does, I expect any gcloud library that integrates with Error Reporting to behave like this when the language permits it. "