Skip to content

Commit

Permalink
stats: revert "Prom stats perf improvements" (#27226)
Browse files Browse the repository at this point in the history
Commit Message: Reverts #24998

See #27173

Additional Description:
Risk Level: n/a
Testing: n/a
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a
  • Loading branch information
jmarantz authored May 6, 2023
1 parent 294dacd commit 5523257
Show file tree
Hide file tree
Showing 26 changed files with 973 additions and 1,360 deletions.
27 changes: 17 additions & 10 deletions source/server/admin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,11 @@ envoy_cc_library(

envoy_cc_library(
name = "stats_request_lib",
srcs = [
"grouped_stats_request.cc",
"stats_request.cc",
"ungrouped_stats_request.cc",
],
hdrs = [
"grouped_stats_request.h",
"stats_request.h",
"ungrouped_stats_request.h",
],
srcs = ["stats_request.cc"],
hdrs = ["stats_request.h"],
deps = [
":handler_ctx_lib",
":prometheus_stats_lib",
":stats_params_lib",
":stats_render_lib",
":utils_lib",
Expand Down Expand Up @@ -190,6 +183,7 @@ envoy_cc_library(
hdrs = ["stats_handler.h"],
deps = [
":handler_ctx_lib",
":prometheus_stats_lib",
":stats_render_lib",
":stats_request_lib",
":utils_lib",
Expand All @@ -203,6 +197,19 @@ envoy_cc_library(
],
)

envoy_cc_library(
name = "prometheus_stats_lib",
srcs = ["prometheus_stats.cc"],
hdrs = ["prometheus_stats.h"],
deps = [
":stats_params_lib",
":utils_lib",
"//envoy/stats:custom_stat_namespaces_interface",
"//source/common/buffer:buffer_lib",
"//source/common/stats:histogram_lib",
],
)

envoy_cc_library(
name = "listeners_handler_lib",
srcs = ["listeners_handler.cc"],
Expand Down
10 changes: 9 additions & 1 deletion source/server/admin/admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,15 @@ AdminImpl::AdminImpl(const std::string& profile_path, Server::Instance& server,
makeHandler("/ready", "print server state, return 200 if LIVE, otherwise return 503",
MAKE_ADMIN_HANDLER(server_info_handler_.handlerReady), false, false),
stats_handler_.statsHandler(false /* not active mode */),
stats_handler_.prometheusStatsHandler(),
makeHandler("/stats/prometheus", "print server stats in prometheus format",
MAKE_ADMIN_HANDLER(stats_handler_.handlerPrometheusStats), false, false,
{{ParamDescriptor::Type::Boolean, "usedonly",
"Only include stats that have been written by system since restart"},
{ParamDescriptor::Type::Boolean, "text_readouts",
"Render text_readouts as new gaugues with value 0 (increases Prometheus "
"data size)"},
{ParamDescriptor::Type::String, "filter",
"Regular expression (Google re2) for filtering stats"}}),
makeHandler("/stats/recentlookups", "Show recent stat-name lookups",
MAKE_ADMIN_HANDLER(stats_handler_.handlerStatsRecentLookups), false, false),
makeHandler("/stats/recentlookups/clear", "clear list of stat-name lookups and counter",
Expand Down
117 changes: 0 additions & 117 deletions source/server/admin/grouped_stats_request.cc

This file was deleted.

61 changes: 0 additions & 61 deletions source/server/admin/grouped_stats_request.h

This file was deleted.

Loading

0 comments on commit 5523257

Please sign in to comment.