Skip to content

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

Description

@MaxGabriel

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions