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

feat: add ability to periodically request debug headers #139

Merged
merged 9 commits into from
Apr 6, 2022

Conversation

igorbernstein2
Copy link
Contributor

This feature is opt-in by setting debug_header_interval_secs in the ApiConfig:

  • 0 will disable the feature (default)
  • -1 will requests debug headers for every RPC
  • N > 0 will request headers once every N seconds and every time a channel changes state

The response headers can be examined in verbose grpc logs. The contents will be encrypted and will only be viewable by a google engineer

@igorbernstein2 igorbernstein2 marked this pull request as ready for review April 5, 2022 21:44
@nimf
Copy link
Collaborator

nimf commented Apr 5, 2022

/gcbrun

Copy link
Collaborator

@nimf nimf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -152,6 +153,11 @@ export = (grpc: GrpcModule) => {
: [];
newCallOptions.interceptors = interceptors.concat([postProcessInterceptor]);

if (channelFactory.shouldRequestDebugHeaders(channelRef.getDebugHeadersRequestedAt())) {
metadata.set('x-return-encrypted-headers', 'all_response');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we wanted to use 'true' here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to include the afe headers as well

@nimf
Copy link
Collaborator

nimf commented Apr 5, 2022

/gcbrun

@nimf
Copy link
Collaborator

nimf commented Apr 6, 2022

/gcbrun

@nimf
Copy link
Collaborator

nimf commented Apr 6, 2022

/gcbrun

@nimf nimf merged commit e551d92 into GoogleCloudPlatform:master Apr 6, 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

Successfully merging this pull request may close these issues.

2 participants