Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

expose Register func #96

Merged
merged 1 commit into from
May 2, 2019
Merged

expose Register func #96

merged 1 commit into from
May 2, 2019

Conversation

xcoulon
Copy link
Contributor

@xcoulon xcoulon commented May 2, 2019

make this func usable from outside of the package
as it is fairly generic.

Signed-off-by: Xavier Coulon xcoulon@redhat.com

make this func usable from outside of the package
as it is fairly generic.

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
@codecov
Copy link

codecov bot commented May 2, 2019

Codecov Report

Merging #96 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #96   +/-   ##
======================================
  Coverage    66.5%   66.5%           
======================================
  Files          32      32           
  Lines        1424    1424           
======================================
  Hits          947     947           
  Misses        401     401           
  Partials       76      76
Impacted Files Coverage Δ
metric/metric.go 88.37% <100%> (ø) ⬆️

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 41fa54b...98b4c36. Read the comment docs.

@nurali-techie
Copy link
Contributor

@xcoulon why do you want to expose Register func. This metric can be used with Recorder. For ex, wit_code

@xcoulon
Copy link
Contributor Author

xcoulon commented May 2, 2019

@xcoulon why do you want to expose Register func. This metric can be used with Recorder. For ex, wit_code

because I want to expose deactivation metrics in auth, but this func seems very generic so I could have my own RegisterDeactivationMetrics in a metric pkg in auth.

@@ -107,7 +107,8 @@ func registerMetrics(service string, opts ...BucketOption) {
log.Info(nil, nil, "metrics registered successfully")
}

func register(c prometheus.Collector, name string) prometheus.Collector {
// Register registers the given collector
func Register(c prometheus.Collector, name string) prometheus.Collector {
Copy link
Contributor

Choose a reason for hiding this comment

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

overall, Register() func looks tiny to be reused.

Copy link
Contributor

@nurali-techie nurali-techie left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@xcoulon xcoulon merged commit 4c8e64a into fabric8-services:master May 2, 2019
@xcoulon xcoulon deleted the Issue_expose_metric_func branch May 2, 2019 12:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants