-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
downstream: refactoring code to remove listener hard deps (#24394)
Risk Level: low (simply moving code around) Testing: n/a Docs Changes: n/a Release Notes: n/a Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
- Loading branch information
1 parent
50ac04b
commit ac20104
Showing
17 changed files
with
87 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#pragma once | ||
|
||
#include "envoy/stats/scope.h" | ||
#include "envoy/stats/stats_macros.h" | ||
|
||
namespace Envoy { | ||
namespace Server { | ||
|
||
#define ALL_LISTENER_STATS(COUNTER, GAUGE, HISTOGRAM) \ | ||
COUNTER(downstream_cx_destroy) \ | ||
COUNTER(downstream_cx_overflow) \ | ||
COUNTER(downstream_cx_total) \ | ||
COUNTER(downstream_cx_transport_socket_connect_timeout) \ | ||
COUNTER(downstream_cx_overload_reject) \ | ||
COUNTER(downstream_global_cx_overflow) \ | ||
COUNTER(downstream_pre_cx_timeout) \ | ||
COUNTER(downstream_listener_filter_remote_close) \ | ||
COUNTER(downstream_listener_filter_error) \ | ||
COUNTER(no_filter_chain_match) \ | ||
GAUGE(downstream_cx_active, Accumulate) \ | ||
GAUGE(downstream_pre_cx_active, Accumulate) \ | ||
HISTOGRAM(downstream_cx_length_ms, Milliseconds) | ||
|
||
/** | ||
* Wrapper struct for listener stats. @see stats_macros.h | ||
*/ | ||
struct ListenerStats { | ||
ALL_LISTENER_STATS(GENERATE_COUNTER_STRUCT, GENERATE_GAUGE_STRUCT, GENERATE_HISTOGRAM_STRUCT) | ||
}; | ||
|
||
#define ALL_PER_HANDLER_LISTENER_STATS(COUNTER, GAUGE) \ | ||
COUNTER(downstream_cx_total) \ | ||
GAUGE(downstream_cx_active, Accumulate) | ||
|
||
/** | ||
* Wrapper struct for per-handler listener stats. @see stats_macros.h | ||
*/ | ||
struct PerHandlerListenerStats { | ||
ALL_PER_HANDLER_LISTENER_STATS(GENERATE_COUNTER_STRUCT, GENERATE_GAUGE_STRUCT) | ||
}; | ||
|
||
} // namespace Server | ||
} // namespace Envoy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters