Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Allow to disable hostname #65

Merged
merged 1 commit into from
Mar 2, 2017

Conversation

johanneswuerbach
Copy link
Contributor

@johanneswuerbach johanneswuerbach commented Mar 2, 2017

This allows to disable sending a host tag by setting the host to false.

This helps in cases where statsd is not running on the same instance the tracked application is running.

@bryanmikaelian
Copy link
Contributor

bryanmikaelian commented Mar 2, 2017

Thanks for the PR! @mheffner can I get your +1 on this or thoughts? I'm not opposed to merging this.

Copy link
Contributor

@mheffner mheffner left a comment

Choose a reason for hiding this comment

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

Question on the legacy flag check, but LGTM.

lib/librato.js Outdated
// Set global measurement tags if they are defined.
if (config.librato.writeToLegacy && Object.keys(config.librato.writeToLegacy).length) {
// Write legacy metrics if enabled.
if (config.librato.writeToLegacy) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems unrelated?

Copy link
Contributor

Choose a reason for hiding this comment

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

@bryanmikaelian did we have a broken check here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh weird. The check is valid but it looks like the comment was wrong.

@johanneswuerbach Would you mind taking this out of your PR? I'll update the comment and verify everything is working in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but the check seems wrong for a boolean value Object.keys(true).length === 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

This allows to disable sending a host tag by setting the host to false.
@bryanmikaelian bryanmikaelian removed the request for review from jderrett March 2, 2017 16:43
@bryanmikaelian bryanmikaelian merged commit 8994b47 into librato:master Mar 2, 2017
@johanneswuerbach johanneswuerbach deleted the disable-hostname branch March 2, 2017 16:54
@bryanmikaelian bryanmikaelian modified the milestone: Tagged Measurements Apr 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants