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

Allows custom prometheus metrics collector #763

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

fedefernandez
Copy link
Contributor

@fedefernandez fedefernandez commented Jan 24, 2020

What this does?

This PR have two goals:

  • Easily skip some metric collection. So now you can just send a None in some of the metric fields and that metric will be skipped.
  • Easily allow to implement the metrics for some call. For example, you can customize the recordTotalTime by sending your custom totalTime Histogram and then override the DefaultPrometheusMetricsOps class.

The binary compatibility is maintained by keeping the two public methods (build and apply) untouched.

Checklist

  • Reviewed the diff to look for typos, println and format errors.
  • Updated the docs accordingly.

@fedefernandez fedefernandez marked this pull request as ready for review January 24, 2020 16:41
@codecov
Copy link

codecov bot commented Jan 24, 2020

Codecov Report

Merging #763 into master will decrease coverage by 0.27%.
The diff coverage is 88.46%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #763      +/-   ##
=========================================
- Coverage   80.98%   80.7%   -0.28%     
=========================================
  Files          73      73              
  Lines        1162    1166       +4     
  Branches       15      15              
=========================================
  Hits          941     941              
- Misses        221     225       +4
Impacted Files Coverage Δ
...kindness/mu/rpc/prometheus/PrometheusMetrics.scala 90% <88.46%> (-2.31%) ⬇️
...kindness/mu/rpc/srcgen/avro/AvroSrcGenerator.scala 68.25% <0%> (-4.77%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 136f81e...79230fd. Read the comment docs.

@fedefernandez fedefernandez merged commit 7368fec into master Jan 29, 2020
@fedefernandez fedefernandez deleted the ff/prometheus-metrics branch January 29, 2020 09:42
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.

3 participants