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

support tags in configuration file #90

Open
linbo opened this issue Dec 4, 2014 · 1 comment
Open

support tags in configuration file #90

linbo opened this issue Dec 4, 2014 · 1 comment

Comments

@linbo
Copy link

linbo commented Dec 4, 2014

Hi,

Since for most cases, metrics are already predefined in different groups, init metrics with tags is preferred.

I think can folsom support tags in configuration file? for example

 $ echo '[{folsom, [{history, [{hist1, [tag1, tag2]}, {hist2, [tag2, tag3]} ]}, {gauge, gauge1}]}].' \
      > myapp.config
   $ erl -pa ebin deps/*/ebin -config myapp.config -s folsom

The init code changed as flowing:

configure_metric(New, Spec) when is_list(Spec) ->
    apply(folsom_metrics, New, Spec);
configure_metric(New, Spec) ->
    case Spec of
        {Name, Tags} ->
            folsom_metrics:New(Name),
            [folsom_metrics:tag_metric(Name, Tag) || Tag <- Tags];
        Name ->
            folsom_metrics:New(Name)
    end.

If accept, can I send a pull request?

@joewilliams
Copy link
Contributor

Folsom has moved, please resubmit your issue at https://github.com/folsom-project Thanks!

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

No branches or pull requests

2 participants