Handler that returns statistics data. More...
#include <userver/server/handlers/server_monitor.hpp>
Public Member Functions | |
ServerMonitor (const components::ComponentConfig &config, const components::ComponentContext &component_context) | |
std::string | HandleRequestThrow (const http::HttpRequest &request, request::RequestContext &) const override |
![]() | |
HttpHandlerBase (const components::ComponentConfig &config, const components::ComponentContext &component_context, bool is_monitor=false) | |
void | HandleRequest (request::RequestBase &request, request::RequestContext &context) const override |
void | ReportMalformedRequest (request::RequestBase &request) const final |
virtual const std::string & | HandlerName () const |
const std::vector< http::HttpMethod > & | GetAllowedMethods () const |
virtual logging::Level | GetLogLevelForResponseStatus (http::HttpStatus status) const |
virtual FormattedErrorData | GetFormattedExternalErrorBody (const CustomHandlerException &exc) const |
std::string | GetResponseDataForLoggingChecked (const http::HttpRequest &request, request::RequestContext &context, const std::string &response_data) const |
![]() | |
HandlerBase (const components::ComponentConfig &config, const components::ComponentContext &component_context, bool is_monitor=false) | |
bool | IsMonitor () const |
Returns whether this is a monitoring handler. | |
const HandlerConfig & | GetConfig () const |
Returns handler config. | |
![]() | |
LoggableComponentBase (const ComponentConfig &, const ComponentContext &) | |
LoggableComponentBase (LoggableComponentBase &&)=delete | |
LoggableComponentBase (const LoggableComponentBase &)=delete | |
~LoggableComponentBase () override=default | |
ComponentHealth | GetComponentHealth () const override |
void | OnLoadingCancelled () override |
void | OnAllComponentsLoaded () override |
void | OnAllComponentsAreStopping () override |
Static Public Member Functions | |
static yaml_config::Schema | GetStaticConfigSchema () |
![]() | |
static yaml_config::Schema | GetStaticConfigSchema () |
![]() | |
static yaml_config::Schema | GetStaticConfigSchema () |
![]() | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Attributes | |
static constexpr std::string_view | kName = "handler-server-monitor" |
The default name of server::handlers::ServerMonitor. | |
Handler that returns statistics data.
Additionally to the common handler options the component has 'common-labels' option that should be a map of label name to label value. Items of the map are added to each metric.
Accepts a path arguments 'format', 'labels', 'path' and 'prefix':
Definition at line 44 of file server_monitor.hpp.
|
overridevirtual |
The core method for HTTP request handling. request
arg contains HTTP headers, full body, etc. The method should return response body.
false
. Reimplemented from server::handlers::HttpHandlerBase.