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

Revisit the need for certain interceptors to be registered as the first one #6409

Open
easwars opened this issue Jun 23, 2023 · 1 comment
Open
Labels
fixit P3 Type: Documentation Documentation or examples

Comments

@easwars
Copy link
Contributor

easwars commented Jun 23, 2023

We have more than one interceptor which asks the user to register it as the first interceptor in their list of interceptors. This seems like a non-sustainable pattern in the long run.

@dfawley
Copy link
Member

dfawley commented Jun 30, 2023

The two examples of this that we found were ORCA and OpenCensus instrumentation.

OC "needs" to be first because it won't include anything before it in the call latency. This is not super critical, but useful to get accurate metrics.

ORCA "needs" to be first because any interceptors that want to set metrics would need to come later. This is only relatively critical.

We can update the docstrings here, but AFAIK there's no way around the fact that ORCA is injected via an interceptor and OC starts timing when its interceptor is invoked.

@dfawley dfawley added Type: Documentation Documentation or examples P3 fixit and removed Type: Bug labels Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixit P3 Type: Documentation Documentation or examples
Projects
None yet
Development

No branches or pull requests

2 participants