-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[#4859] Change default value of flag metric_node_name to hostname:port #5014
Conversation
Looks good in general @vikramrajsitpal , I will run this through our build and unit test pipeline and get back to you. |
Can you please update the PR summary with a test plan? For ex: are change reflected in http://127.0.0.1:7000/prometheus-metrics when the flag is not specified vs explicitly specified? |
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor formatting comments. I will let you know what the results of the internal test pipeline are - just in case there are any unit tests that depend on this flag value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also need to set this flag by default for tablet servers too, so I would also add similar code to tablet_server_main.cc.
Changes added, tests performed for master and tablet server. Command: On opening |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I will run it through the internal tests once again to make sure nothing changes.
A couple of minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience @vikramrajsitpal ! Just one minor indentation issue remaining.
7f902df
to
0eb413b
Compare
Had to force push as the commit message had a typo in the Issue number. |
There is a conflict in the CONTRIBUTORS.md file, apparently, could you rebase your branch to the latest commit in master, fix the conflict and possibly force push again? |
0eb413b
to
2e45ea2
Compare
So, I first merged my forked repo's master branch with yugabyte-db/master. Then I rebased my fix branch which is used in this PR and resolved the conflict. I have pushed my fix branch for now and it is visible here, but, it has an extra commit which it prompted me to make when I finished merging my master branch with ydb's master branch, so that is also visible. Please let me know if it is not acceptable. |
…ame to hostname:port Default value for GFLAG metric_node_name was "DEFAULT_NODE_NAME". Changed this to hostname:web_server_port. <target>/prometheus-metrics now show new default value.
… of metric_node_name for tablet servers As per PR review comments, made minor changes to styling and GetHostName(). No change in logic. Also changed the default value for FLAG metric_node_name to hostname:webserverPort for the tablet server.
Used strings::Substitute as per the review comment.
No other changes.
2e45ea2
to
a4d2a6f
Compare
prometheus-metrics: change default metric_node_name to hostname:port
Default value for GFLAG metric_node_name was "DEFAULT_NODE_NAME". Changed this to hostname:web_server_port.
/prometheus-metrics now show new default value.
Summary:
Test (on localhost):
Command:
./bin/yb-ctl start --rf 1
On opening http://127.0.0.1:7000/prometheus-metrics, the
exported_instance
field shows hostname:webserverPortCommand with custom
metric_node_name
:./bin/yb-ctl start --rf 1 --master_flags "metric_node_name=alpha:1"
On opening http://127.0.0.1:7000/prometheus-metrics, the
exported_instance
field showsalpha:1