-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
metadata: add ValueFromIncomingContext to more efficiently retrieve a single value #5596
Conversation
|
FromIncomingContext creates a copy of md every time. So even if you need a single header value you will get a value and an overhead for this. Many interceptors and user code doesn't need all values at a time.
18ee8a3
to
e73bfc2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few nits, other than LGTM.
@dfawley for a second reviewer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo the two very minor changes. Thanks!
Thank you for the contribution! |
FromIncomingContext creates a copy of md every time.
So even if you need a single header value you will get a value and an overhead for this.
Many interceptors and user code doesn't need all values at a time.
I'd like also to add a helper to just check key existence.
RELEASE NOTES:
ValueFromIncomingContext
to more efficiently retrieve a single value