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

expose incoming call deadline to the server handler #1531

Closed
hugebdu opened this issue Aug 9, 2020 · 6 comments
Closed

expose incoming call deadline to the server handler #1531

hugebdu opened this issue Aug 9, 2020 · 6 comments

Comments

@hugebdu
Copy link
Contributor

hugebdu commented Aug 9, 2020

Is your feature request related to a problem? Please describe.

Being able to access incoming request deadline might help with traceability and allow one to implement multi-transport SLA features - in our case we have several transports aside with gRPC and have our own SLA abstraction, which is mapped to gRPC deadlines for gRPC flows.

And it is available for java-grpc, didn't check other implementations.

Describe the solution you'd like

The value is available on the event.new_call. I guess it is just a matter of passing it into ServerUnaryCall (and friends).

Describe alternatives you've considered

none

Additional context

none

@murgatroid99
Copy link
Member

We are not making any more feature changes to the Node grpc library, so it is unlikely that we will make this change there.

On the other hand, I would have no objection to making this change in the @grpc/grpc-js library, which you should use instead. However, that will be a bit more work because we will have to add in the conversion from the relative time representation on the wire to the absolute "deadline" representation.

@hugebdu
Copy link
Contributor Author

hugebdu commented Aug 11, 2020

@murgatroid99 thanks for your response.
would you consider accepting a PR?
IMO shouldn't be a breaking change

@murgatroid99
Copy link
Member

I ended up implementing this in @grpc/grpc-js version 1.2.0 incidentally while addressing #1542. The server call classes now have a getDeadline method that returns the deadline.

@hugebdu
Copy link
Contributor Author

hugebdu commented Nov 17, 2020

@murgatroid99 thanks a lot, that's really helpful.

cc @alexandervain

@murgatroid99
Copy link
Member

The grpc package is now deprecated so this change will not be made there. This change has been made in @grpc/grpc-js, so I consider this resolved.

@hugebdu
Copy link
Contributor Author

hugebdu commented May 9, 2021

perfect. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants