-
Notifications
You must be signed in to change notification settings - Fork 5.3k
request_id_extension: Add noop impl by default #10687
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |
|
|
||
| #include "common/common/assert.h" | ||
| #include "common/common/dump_state_utils.h" | ||
| #include "common/http/request_id_extension_impl.h" | ||
| #include "common/stream_info/filter_state_impl.h" | ||
|
|
||
| namespace Envoy { | ||
|
|
@@ -20,12 +21,14 @@ struct StreamInfoImpl : public StreamInfo { | |
| StreamInfoImpl(TimeSource& time_source) | ||
| : time_source_(time_source), start_time_(time_source.systemTime()), | ||
| start_time_monotonic_(time_source.monotonicTime()), | ||
| filter_state_(std::make_shared<FilterStateImpl>(FilterState::LifeSpan::FilterChain)) {} | ||
| filter_state_(std::make_shared<FilterStateImpl>(FilterState::LifeSpan::FilterChain)), | ||
| request_id_extension_(Http::RequestIDExtensionFactory::noopInstance()) {} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looking at this, I think these constructors can mostly be collapsed with each one invoking the previous with fewer arguments. This would be a nice follow up.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good, will send a follow up pr. Does it need a TODO for the time being?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created #10691, will rebase once this one is merged. |
||
|
|
||
| StreamInfoImpl(Http::Protocol protocol, TimeSource& time_source) | ||
| : time_source_(time_source), start_time_(time_source.systemTime()), | ||
| start_time_monotonic_(time_source.monotonicTime()), protocol_(protocol), | ||
| filter_state_(std::make_shared<FilterStateImpl>(FilterState::LifeSpan::FilterChain)) {} | ||
| filter_state_(std::make_shared<FilterStateImpl>(FilterState::LifeSpan::FilterChain)), | ||
| request_id_extension_(Http::RequestIDExtensionFactory::noopInstance()) {} | ||
|
|
||
| StreamInfoImpl(Http::Protocol protocol, TimeSource& time_source, | ||
| std::shared_ptr<FilterState>& parent_filter_state) | ||
|
|
@@ -34,7 +37,8 @@ struct StreamInfoImpl : public StreamInfo { | |
| filter_state_(std::make_shared<FilterStateImpl>( | ||
| FilterStateImpl::LazyCreateAncestor(parent_filter_state, | ||
| FilterState::LifeSpan::DownstreamConnection), | ||
| FilterState::LifeSpan::FilterChain)) {} | ||
| FilterState::LifeSpan::FilterChain)), | ||
| request_id_extension_(Http::RequestIDExtensionFactory::noopInstance()) {} | ||
|
|
||
| SystemTime startTime() const override { return start_time_; } | ||
|
|
||
|
|
||
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.
nit: it would be nice to get coverage of the other methods here in the unit test you added.