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

Fixed illegal character problem #11

Conversation

SebastianIoanPop
Copy link
Contributor

No description provided.

@ElvenSpellmaker
Copy link
Contributor

:shipit:

@ElvenSpellmaker
Copy link
Contributor

@SebastianIoanPop Shouldn't there be tests for this functionality btw?

index.js Outdated
@@ -2,6 +2,9 @@
let defaultInterval = 10;
let oneSecInMs = 1000;
let keyCountAppendName = 'keyCounter';
let statsdIllegalCharacter = ':';
let defaultWordSeparatorCharacter = '-';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to use a const for that

index.js Outdated
@@ -50,7 +53,9 @@ redisClients.forEach((c) => {
return;
}

statsdClient.gauge(`${prefix}${stat.key}${suffix}`, stat.count);
var cleanKey = stat.key.replace(statsdIllegalCharacter, defaultWordSeparatorCharacter);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var declaration should be at the top of the code block + use let

Copy link

@nicolaspujol nicolaspujol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments

index.js Outdated

if (err) {
util.log(`[${c.host}] ${err}`);
return;
}

statsdClient.gauge(`${prefix}${stat.key}${suffix}`, stat.count);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove spaces/tab

@SebastianIoanPop SebastianIoanPop merged commit 0e618da into ve-global:master Jul 17, 2017
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.

3 participants