Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript exception: Cannot read property 'gc' of undefined #51

Open
MaxGabriel opened this issue Apr 3, 2016 · 0 comments
Open

Javascript exception: Cannot read property 'gc' of undefined #51

MaxGabriel opened this issue Apr 3, 2016 · 0 comments

Comments

@MaxGabriel
Copy link

Hi, when running the EKG server without GC metrics I'm getting the following exception:

monitor.js:337 Uncaught TypeError: Cannot read property 'gc' of undefined

Here's the stacktrace:

monitor.js:337 Uncaught TypeError: Cannot read property 'gc' of undefined
current_bytes_used @ monitor.js:337
onDataReceived @ monitor.js:159
onDataReceived @ monitor.js:118
e.resolveWith @ jquery-1.6.4.min.js:2
w @ jquery-1.6.4.min.js:4
d @ jquery-1.6.4.min.js:4

Here's a minimal reproduction:

{-# LANGUAGE OverloadedStrings #-}

import qualified System.Remote.Monitoring as EKG
import qualified System.Metrics as EKG

import Control.Concurrent
import Control.Monad


main :: IO ()
main = do
  store <- EKG.newStore
  -- EKG.registerGcMetrics store -- Uncomment to prevent JS exception
  aCounter <- EKG.createCounter "myapp.home_requests" store
  _ <- EKG.forkServerWith store "localhost" 8000
  forever $ do
    putStrLn "Running..."
    threadDelay 10000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant