signalstreamer
v0.1.0
Published
> WebSocket client for SignalFx.
Downloads
3
Readme
signalstreamer
WebSocket client for SignalFx.
Example
const streamer = new SignalStreamer({
endpoint: 'wss://stream.signalfx.com/v2/signalflow/connect',
token: localStorage.SFX_TOKEN
});
const stream = streamer.stream({
program: `data('demo.trans.count').publish(label='A');`,
start: Date.now() - 1000 * 60
});
stream.on('data', (datum) => {
// Whenever a new datum is received, log out all buffered data.
console.log(stream.data());
});
stream.start();
Development
git clone [email protected]:signalfx/signalstreamer.git
cd signalstreamer
npm install
npm run dev
# webserver will start on port 9000, serving /example/index.html as well as contents of /lib.