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

feat: add way to inject custom prom-client instance #100

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

wiktor-obrebski
Copy link
Contributor

As fastify-metrics use internal, specific version of prom-client, it sometimes provide situations, where it need to share the promClient instance with external code. Often there much more other sources of metrics that need to be collection, other than fastify requests.

Currently, it possible to get internally used promClient instance by fastifyApp.metrics.client, but its not very convinient to use.

This PR introduce a way to provide external promClient instance to use with fastify-metrics.

--
Additional advantage of this solution is to decrease risk of unintentional usage of 2 different promClient instances. It is possible when the project use different version of prom-client than the fastify-metrics use internally.

Copy link

codecov bot commented Jan 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fabf6d7) 98.85% compared to head (7e1537e) 98.85%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #100   +/-   ##
=======================================
  Coverage   98.85%   98.85%           
=======================================
  Files           2        2           
  Lines         174      175    +1     
  Branches       73       74    +1     
=======================================
+ Hits          172      173    +1     
  Misses          1        1           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SkeLLLa SkeLLLa merged commit aa873d8 into SkeLLLa:master Jan 14, 2024
7 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 14, 2024
## [10.6.0](v10.5.0...v10.6.0) (2024-01-14)

### 🚀 Features

* add way to inject custom prom-client instance ([#100](#100)) ([aa873d8](aa873d8))
Copy link
Contributor

🎉 This PR is included in version 10.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants