Skip to content

Commit

Permalink
fixup 3e9746d: /dev/rts_stats should sample on each GET
Browse files Browse the repository at this point in the history
oops...

GitOrigin-RevId: 3e0a50c
jberryman authored and hasura-bot committed Apr 14, 2021
1 parent f7c37b0 commit 8222651
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/src-lib/Hasura/Server/App.hs
Original file line number Diff line number Diff line change
@@ -995,8 +995,9 @@ httpApp setupHook corsCfg serverCtx enableConsole consoleAssetsDir enableTelemet
-- See: https://hackage.haskell.org/package/base/docs/GHC-Stats.html
exposeRtsStats <- liftIO RTS.getRTSStatsEnabled
when exposeRtsStats $ do
stats <- liftIO RTS.getRTSStats
Spock.get "dev/rts_stats" $ Spock.json stats
Spock.get "dev/rts_stats" $ do
stats <- liftIO RTS.getRTSStats
Spock.json stats

when (isDeveloperAPIEnabled serverCtx) $ do
Spock.get "dev/ekg" $ spockAction encodeQErr id $

0 comments on commit 8222651

Please sign in to comment.