stats-gopher

command module
v0.0.0-...-6ba8834 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2014 License: MIT Imports: 8 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cenkalti/backoff
Package backoff implements backoff algorithms for retrying operations.
Package backoff implements backoff algorithms for retrying operations.
_workspace/src/github.com/codegangsta/negroni
Package negroni is an idiomatic approach to web middleware in Go.
Package negroni is an idiomatic approach to web middleware in Go.
_workspace/src/github.com/yvasiyarov/go-metrics
Go port of Coda Hale's Metrics library <https://github.com/rcrowley/go-metrics> Coda Hale's original work: <https://github.com/codahale/metrics>
Go port of Coda Hale's Metrics library <https://github.com/rcrowley/go-metrics> Coda Hale's original work: <https://github.com/codahale/metrics>
Metrics output to StatHat.
_workspace/src/github.com/yvasiyarov/gorelic
Package gorelic is an New Relic agent implementation for Go runtime.
Package gorelic is an New Relic agent implementation for Go runtime.
_workspace/src/github.com/yvasiyarov/newrelic_platform_go
Package newrelic_platform_go is New Relic Platform Agent SDK for Go language.
Package newrelic_platform_go is New Relic Platform Agent SDK for Go language.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL