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

MetricParser requires characters before and after metric command #40

Closed
beberlei opened this issue Jan 23, 2013 · 3 comments
Closed

MetricParser requires characters before and after metric command #40

beberlei opened this issue Jan 23, 2013 · 3 comments

Comments

@beberlei
Copy link

If i just want to publish metrics then i have to log:

$logger->info(" METRIC_COUNT metric=foo value=1 ");

Why is this necessary? couldn't the regexp allow no spaces as well? This is a source of bugs in our code where metrics don't get published because people forget to add spaces around them.

@benburry
Copy link
Contributor

The MetricLogster METRIC_COUNT regular expression requires there to be at least a single character matching [^0-9.] after the metric value. It will however allow you to have no leading spaces (or other characters) before the METRIC_COUNT entry.

You can see the regular expression it's using here https://github.com/etsy/logster/blob/de0626/logster/parsers/MetricLogster.py#L67

I think it would be safe to drop the [^0-9.] requirement after the metric value. How would you feel about creating a pull request with that change?

@benburry
Copy link
Contributor

Any update on this?

@benburry
Copy link
Contributor

benburry commented Jun 5, 2015

I'm closing this as I think the question has been answered.

@beberlei feel free to reopen if you need to talk further on it

@benburry benburry closed this as completed Jun 5, 2015
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