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

Internal Metrics Channel #82

Merged
merged 13 commits into from
Jul 30, 2013
Merged

Internal Metrics Channel #82

merged 13 commits into from
Jul 30, 2013

Conversation

ryandotsmith
Copy link
Owner

In regards to #81, this is an implementation of an internal metrics channel. The interface looks like this:

verbose := false
mchan := metchan.New(verbose, "https://u:[email protected]/...")

func hello() {
    defer mchan.Measure("some.function", time.Now())
    return
}

This will buffer and send a complex measurement to Librato's API.

@ryandotsmith
Copy link
Owner Author

The metchan feature is enabled by specifying $METCHAN_URL which consequently holds the Librato URI (credentials included) for which the metchan will outlet the metrics to.

@ryandotsmith
Copy link
Owner Author

There is extensive GoDoc code that explains how to use this new feature from a developer's perspective.

@ryandotsmith
Copy link
Owner Author

This code uses its own HTTP client and is orthogonal to the librato outlet that user traffic flows though. Basically, metchan is completely isolated from normal l2met operations.

@ryandotsmith
Copy link
Owner Author

Going to add a few integration tests tomorrow.

@ryandotsmith
Copy link
Owner Author

It may be worth considering #76 with this feature. Since metchan has the ability to print the metrics to stdout, we may want to use the log package so that we can solve the problem mentioned in #76

@ryandotsmith
Copy link
Owner Author

I have started documenting the areas of the system which metchan is now monitoring. The docs are found in the wiki: https://github.com/ryandotsmith/l2met/wiki/Administration#monitoring

ryandotsmith added a commit that referenced this pull request Jul 30, 2013
Internal Metrics Channel (a.k.a. Metchan)
@ryandotsmith ryandotsmith merged commit ed0b965 into master Jul 30, 2013
@ryandotsmith ryandotsmith deleted the metchan branch July 30, 2013 19:49
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

Successfully merging this pull request may close these issues.

1 participant