Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide additional call site context when exception originates in gRPC #973

Open
bcoe opened this issue Mar 12, 2021 · 1 comment
Open
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@bcoe
Copy link
Contributor

bcoe commented Mar 12, 2021

Errors like RESOURCE_EXHAUSTED to not provide contextual information about where the exception occurs in a user's application:

Error: 8 RESOURCE_EXHAUSTED: Bandwidth exhausted
    at Object.callErrorFromStatus (/root/repo/node_modules/@grpc/grpc-js/build/src/call.js:30:26)
    at Http2CallStream.<anonymous> (/root/repo/node_modules/@grpc/grpc-js/build/src/client.js:96:33)
    at Http2CallStream.emit (events.js:215:7)
    at Http2CallStream.EventEmitter.emit (domain.js:476:20)
    at /root/repo/node_modules/@grpc/grpc-js/build/src/call-stream.js:75:22
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  code: 8,
  details: 'Bandwidth exhausted',
  metadata: Metadata { internalRepr: Map {}, options: {} },
  note: 'Exception occurred in retry method that was not classified as transient'
}

It would be nice if we knew the specific method call that triggered exceptions.

Refs: googleapis/nodejs-datastore#525

@bcoe bcoe added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Mar 12, 2021
@galaxyfeeder
Copy link

Facing the same issue over here.

Maybe an approach similar to what grpc implemented in grpc/grpc-node@0182337 would makes sense for gax.

On our case are calls with Cloud Tasks client. For what I've been able to see, the stack trace could be obtained until this promise at the createApiCall starts executing.

I think the calling context of the stack trace could be stored on the OnGoingCallPromise, then appended to the stack when the rejection function is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants