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

Added a way to support custom hostname to emit metrics #3017

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

svnarumugam
Copy link
Contributor

@svnarumugam svnarumugam commented Dec 8, 2021

This change will enable us to pass custom hostname (usually a fixed one) to emit and refer metrics in containerized Azkaban web server. If the custom metric property is not set, it fallbacks to the default behaviour (ie we consider the hostname of the machine).

Tested this change in conjunction with AmfReporter library update, and observed that metrics got emitted.

Copy link
Collaborator

@sshardool sshardool left a comment

Choose a reason for hiding this comment

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

Thanks for taking this up, overall change looks good except one comment below.

@@ -117,14 +117,19 @@ public Timer addTimer(final String name) {
public synchronized void startReporting(final String reporterName, final Props props) {
final String metricsReporterClassName = props.get(CUSTOM_METRICS_REPORTER_CLASS_NAME);
final String metricsServerURL = props.get(METRICS_SERVER_URL);
final String customHostNameToEmitMetrics = props.get(CUSTOM_METRICS_HOSTNAME);
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the behavior when the property CUSTOM_METRICS_HOSTNAME is not set ?
Ideally we would wan't the default behavior to stay unchanged, if that's the case please mention that in a comment. Please let me know if you think otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this property is an optional one. If we don't set it, the default behaviour stays as it is. Let me update the PR description too. Thanks for taking a look!

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.

None yet

2 participants