Skip to content

[FSSDK-9412] add expose prometheus through custom collector #347

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

Conversation

204Constie
Copy link

Summary

dirty PR that presents the idea of exposing metrics to prometheus via the use of custom prometheus collector

an implementation of the collector interface https://github.com/prometheus/client_golang/blob/main/prometheus/collector.go#L27
similar to this collector: https://github.com/prometheus/client_golang/blob/main/prometheus/expvar_collector.go
it is not an ideal solution as the documentation states ( https://pkg.go.dev/github.com/prometheus/client_golang/prometheus/collectors#NewExpvarCollector )

An expvar Collector collects metrics from the expvar interface. It provides a quick way to expose numeric values that are already exported via expvar as Prometheus metrics. Note that the data models of expvar and Prometheus are fundamentally different, and that the expvar Collector is inherently slower than native Prometheus metrics. Thus, the expvar Collector is probably great for experiments and prototying, but you should seriously consider a more direct implementation of Prometheus metrics for monitoring production systems.```
however it does not require implementation of any generic instrumentation tooling like opentelemetry


## Issues
- "THING-1234" or "Fixes #123"

// }
// ch <- m
//}
if strings.Contains(name, "responseTimeHist") {
Copy link
Author

Choose a reason for hiding this comment

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

@Tamara-Barum
Copy link

Internal ticket for tracking: FSSDK-9412

@russell-loube-optimizely russell-loube-optimizely changed the title add expose prometheus through custom collector [FSSDK-9412] add expose prometheus through custom collector May 30, 2023
@pulak-opti
Copy link
Contributor

Hi @204Constie
Thanks for the PR. Could you please update your branch with the master branch?

@pulak-opti
Copy link
Contributor

Hi @204Constie
Thanks for the idea about collecting Prometheus metrics. However, the feature is added here #348. Please reach out if you have anything.

@pulak-opti pulak-opti closed this Jun 8, 2023
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