Giter Site home page Giter Site logo

stats-gopher's Introduction

Stats Gopher

Circle CI

A web stats endpoint for relaying stats to NewRelic Insights from the browser.

Environment variables:

  • PORT defaults to 80
  • NEW_RELIC_INSIGHTS_KEY
  • NEW_RELIC_INSIGHTS_ENDPOINT
  • STDOUT_LISTENER=1 prints all events received to STDOUT

NEW_RELIC_INSIGHTS_* values come from Insights (See "Manage Data" / "API Keys" within Insights)

Events

http://wherever.its.hosted.net/gopher/

POST Any data here to have it relayed to insights

Stats Gopher does no processing of the data; events are relayed unchanged

Presence

http://wherever.its.hosted.net/presence/

This allows a browser to send heartbeat and user-activity notifications. The stats gopher is currently (statically) configured to monitor for only these two types of presence. Other notifications would be ignored.

Expected usage scenario:

Browsers sends a regular (~10s) heartbeat notification:

{
  key: "<session-id>@my-site",
  code: "heartbeat"
}

and sends useractivity notifications whenever a window mouse event is triggered:

{
  key: "<session-id>@my-site",
  code: "user-activity"
}

The stats gopher is configured with a heartbeat timeout of 45s and a user activity timeout of 45min. If either timeout occurs the session is condisered dead and an event is sent to new relic with the session duration

Note the key. The key could be used to monitor a session, sitewide as above, or a single page: <session-id>@my-site/my-page or even all users on a page: my-site/my-page

stats-gopher's People

Contributors

s6577t avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.