Closed jack-evans closed 1 year ago
Hi, you can now set a custom Prometheus registry, namespace and channel using the following options:
serviceName := "my-test-service-name"
customNamespace := "my_custom_namespace"
customRegistry := prometheus.NewRegistry()
customChannel := make(chan codec.CodecInterface, 100)
// When
metrics := NewPrometheus(
serviceName,
WithCodecChannel(customChannel),
WithNamespace(customNamespace),
WithRegisterer(customRegistry),
)
I close this issue for now but feel free to reopen if you still have any issue.
Thank you
Steps for Reproduction
Currently, the prometheus metrics implementation for the cache only supports the use of the default registerer. This introduces global state into peoples applications and makes it difficult for people with custom registerers to use the prometheus metrics implementation.
Expected behavior:
allow people the option of using a custom metrics registry
Actual behavior:
No metrics for people using a custom prometheus metrics registry
Platforms:
Include browser, operating system and respective versions
Versions:
Which versions are you running?