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

support custom promhttp.HandlerOpts #48

Merged
merged 1 commit into from
Jun 11, 2023

Conversation

jmank88
Copy link
Contributor

@jmank88 jmank88 commented Jun 5, 2023

The func prometheusHandler helper called from New and Use is currently limited to zero value promhttp.HandlerOpts:
https://github.com/Depado/ginprom/blob/master/prom.go#L330-L332

The PR proposes introducing a HandlerOpts field and PrometheusOption for customizing the promhttp.HandlerOpts used by func prometheusHandler.

@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ed5782f) 100.00% compared to head (35dd6a7) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #48   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          245       247    +2     
=========================================
+ Hits           245       247    +2     
Impacted Files Coverage Δ
options.go 100.00% <100.00%> (ø)
prom.go 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@depado
Copy link
Owner

depado commented Jun 11, 2023

LGTM 👍
Thanks!

@depado depado merged commit 79bf1d9 into depado:master Jun 11, 2023
@jmank88 jmank88 deleted the promhttp-handleropts branch June 12, 2023 10:54
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.

2 participants