Skip to content

Commit

Permalink
Use fb303::TFunctionStatHandler in SidecarThriftServer
Browse files Browse the repository at this point in the history
Summary: This will improve sidecar's exported fb303 stats.

Reviewed By: prakashgayasen

Differential Revision: D67438345

fbshipit-source-id: 941945713e2724c72cf1e2ded885bbf6324962f6
  • Loading branch information
Dan Deng authored and facebook-github-bot committed Jan 2, 2025
1 parent 6c1c9ce commit 35302f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fb303/TFunctionStatHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,11 @@ class StandardStatHandler : public TFunctionStatHandler {

} // namespace

std::shared_ptr<TFunctionStatHandler> createDefaultStatHandler(
const char* serviceName) {
return std::make_shared<StandardStatHandler>(serviceName);
}

std::shared_ptr<TFunctionStatHandler> addThriftFunctionStatHandler(
const char* serviceName) {
auto handler = std::make_shared<StandardStatHandler>(serviceName);
Expand Down
3 changes: 3 additions & 0 deletions fb303/TFunctionStatHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,9 @@ class TFunctionStatHandler
const folly::exception_wrapper& ew_) final;
};

std::shared_ptr<TFunctionStatHandler> createDefaultStatHandler(
const char* serviceName);

/**
* Enable Thrift handler call counters
*/
Expand Down

0 comments on commit 35302f9

Please sign in to comment.