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

[yarn] Consolidate Tags #2473

Merged

Conversation

zachradtka
Copy link
Contributor

This is mainly a bug fix to reduce the number of tags created by the YARN agent check.

The major fixes are:

  • Only get metrics from running applications
  • Tag metrics with cluster_name instead of cluster_id
  • Tag metrics with app_name instead of app_id

@olivielpeau olivielpeau added this to the 5.8.0 milestone May 6, 2016
@olivielpeau olivielpeau self-assigned this May 6, 2016
@gmmeyer
Copy link
Contributor

gmmeyer commented May 6, 2016

Thanks a lot for your contribution!

This looks pretty decent, it passes the checks. We will review and test this soon to make sure it all works! 😄


tags = ['cluster_id:' + str(cluster_id), 'app_id:' + str(app_id)]
tags = ['app_name:%s' % str(app_name)]
tags.extend(addl_tags)

self._set_yarn_metrics_from_json(tags, app_json, YARN_APP_METRICS)
Copy link
Member

Choose a reason for hiding this comment

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

The check now tags these metrics by app_name instead of app_id, so there can be duplicate sets of tags for the same metric (when multiple apps have the same name). So we should use increment instead of gauge to send these metrics

@olivielpeau
Copy link
Member

@zachradtka Made 2 comments, once they're addressed we'll test the check on our clusters, and we may have more feedback then :)

Thanks!

'''
Return the cluster ID, otherwise raise an exception
'''
info_json = self._rest_request_to_json(rm_address, INFO_URI)
Copy link
Member

Choose a reason for hiding this comment

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

the INFO_URI var should be removed from the check too

@zachradtka
Copy link
Contributor Author

@olivielpeau I have updated the check and tests to remove the INFO_URL and to ensure that a warning is displayed if the user does not specify a cluster_name in the YAML

@olivielpeau
Copy link
Member

Looks good @zachradtka! Could you squash your commits please? I'll merge once that's done, thanks!

@zachradtka zachradtka force-pushed the minerkasch/yarn-consolidate-tags branch from 2227ae5 to 414272a Compare May 9, 2016 21:05
@olivielpeau olivielpeau merged commit 0bda452 into DataDog:master May 9, 2016
degemer pushed a commit that referenced this pull request Nov 22, 2016
Added application tags in the configuration file,
allowing set extra tags for app metrics like queue,
user, etc.

Also, added the tags functionality merged in
#2473
on tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants