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

Update gitlab_runner to use the new OpenMetricsBaseCheck #1978

Merged
merged 3 commits into from
Sep 20, 2018

Conversation

rishabh
Copy link

@rishabh rishabh commented Aug 2, 2018

What does this PR do?

Updates gitlab_runner to use the new OpenMetricsBaseCheck class.

Motivation

This fixes the check for when we use the new OpenMetricsBaseCheck class.

Review checklist

  • PR has a meaningful title or PR has the no-changelog label attached
  • Feature or bugfix has tests
  • Git history is clean
  • If PR impacts documentation, docs team has been notified or an issue has been opened on the documentation repo

Additional Notes

@rishabh rishabh requested a review from a team as a code owner August 2, 2018 19:40
@rishabh rishabh force-pushed the rish/gitlab_runner-prometheus-rework branch from 53b4791 to 22a9175 Compare August 3, 2018 03:13
@rishabh rishabh force-pushed the rish/gitlab_runner-prometheus-rework branch from 48d5d8f to 3bdfed6 Compare August 3, 2018 18:53
@rishabh rishabh force-pushed the rish/gitlab_runner-prometheus-rework branch 2 times, most recently from 425a979 to ab7f6c9 Compare August 7, 2018 22:15
@rishabh rishabh force-pushed the rish/gitlab_runner-prometheus-rework branch from ab7f6c9 to f0643d3 Compare August 9, 2018 14:33
@rishabh rishabh changed the title Update gitlab_runner to use the new GenericPrometheusCheck Update gitlab_runner to use the new OpenMetricsBaseCheck Aug 9, 2018
# Mapping from Prometheus metrics names to Datadog ones
# For now it's a 1:1 mapping
# TODO: mark some metrics as rate
allowed_metrics = init_config.get('allowed_metrics')
Copy link
Contributor

@mfpierre mfpierre Aug 21, 2018

Choose a reason for hiding this comment

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

We should probably move this away from init_config WDYT? (same for gitlab)

Copy link
Author

Choose a reason for hiding this comment

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

Yes, we should, that will also allow us to actually support multiple endpoints.

We could add a deprecation warning and then adjust the docs to get users to instead define the metrics config option. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do this in some follow-up work

@rishabh rishabh changed the base branch from rish/prometheus_rework to master August 30, 2018 21:20
@rishabh rishabh force-pushed the rish/gitlab_runner-prometheus-rework branch 2 times, most recently from f829daf to b3bc8c8 Compare August 30, 2018 21:21
@codecov-io
Copy link

codecov-io commented Aug 30, 2018

Codecov Report

Merging #1978 into master will decrease coverage by 2.2%.
The diff coverage is 88.46%.

@@            Coverage Diff             @@
##           master    #1978      +/-   ##
==========================================
- Coverage   86.24%   84.04%   -2.21%     
==========================================
  Files         190        4     -186     
  Lines       13901       94   -13807     
  Branches     1491       10    -1481     
==========================================
- Hits        11989       79   -11910     
+ Misses       1499        8    -1491     
+ Partials      413        7     -406

@rishabh rishabh force-pushed the rish/gitlab_runner-prometheus-rework branch from b3bc8c8 to 59505b4 Compare August 31, 2018 19:38
@mfpierre mfpierre force-pushed the rish/gitlab_runner-prometheus-rework branch from 59505b4 to 0d6fc47 Compare September 17, 2018 16:55
mfpierre
mfpierre previously approved these changes Sep 17, 2018
gzussa
gzussa previously approved these changes Sep 17, 2018
Copy link
Contributor

@gzussa gzussa left a comment

Choose a reason for hiding this comment

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

Looks good. Approving it but could you address my comment before to merge it. Thanks

"""
# Mapping from Prometheus metrics names to Datadog ones
# For now it's a 1:1 mapping
# TODO: mark some metrics as rate
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please, remove this TODO or address it.

@mfpierre mfpierre dismissed stale reviews from gzussa and themself via c14fa44 September 18, 2018 08:42
@ofek ofek merged commit 99d86f8 into master Sep 20, 2018
@ofek ofek deleted the rish/gitlab_runner-prometheus-rework branch September 20, 2018 02:51
nmuesch pushed a commit that referenced this pull request Nov 1, 2018
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.

5 participants