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

Follow up on grpc interceptor fix #149

Open
eaddingtonwhite opened this issue Nov 11, 2022 · 0 comments
Open

Follow up on grpc interceptor fix #149

eaddingtonwhite opened this issue Nov 11, 2022 · 0 comments

Comments

@eaddingtonwhite
Copy link
Member

See the following PR for more context.
#148

TLDR: We are using grpc interceptors to inject auth token and user agent metadata per request. When client is using ddtrace library its passing along metadata as list instead of grpc.aio.Metadata object which was causing sdk to choke.

This ticket was meant to be a follow-up for the initial fix we put in for this to make our interceptor more defensive in how it handled inbound client_request_metadata.

Longer term I would like to take the following actions:

  1. I would like to revisit why we are even using client interceptors to inject this metadata into requests in the first place. We are the ones initiating requests with GRPC so we have the opportunity to inject all the metadata we need to make request upfront as we build the request object. We already are injecting cache-name dynamically on request metadata this way from with in our SDK data client here for example using this utility method. We could just make this bit more flexible to set all metadata upfront and thus eliminate the need for us to even have yet another interceptor in the mix on request lifecycle. I think by doing all in side our clients as we build up requests will be easier to debug and maintain.
  2. Work with Datadog longer term and try and patch their interceptor to play better with others and follow proper typing in gRPC python library.
eaddingtonwhite added a commit that referenced this issue Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant