-
Notifications
You must be signed in to change notification settings - Fork 80
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
Question on how to use the library #56
Comments
Hi @NancyXie2022 , I'm having trouble following what you mean by "doesn't work". Could you clarify what behavior you're expecting to see, and what you're seeing instead? |
hmm, I don't see metric get emitted, that what I mean it doesn't work. curl -v http://localhost:9090/metrics
< HTTP/1.1 200 OK
|
@dinowernli thanks for your quick response |
And also do you think my code is right or do you see anything wrong with it? |
Looking at your code, I would expect the RPC server to correctly emit metrics into your |
Hmm, do you mind how to make it serving via your metrics endpoint? Any example on that? |
Assuming your HTTPServer is the one described here [1], then I think the missing piece might be to actually pass in your [1] https://github.com/prometheus/client_java/tree/7cf0cc9dc58981198be106a27333653bed7bf688#http |
Hi,
Our service is a GRPC service, and I am trying to use this library with prometheus to manage the metrics, I have tried to setup my code following the usage example, though it doesn't work, could you give me some suggestions on this?
My grpc server looks like:
var server: Server = null
var httpServer: HTTPServer = null
val pushRegistry = new CollectorRegistry()
def start(): Unit = {
val serverBuilder = if (config.auth.enableTls) {
val certPath = Paths.get(config.auth.serverCertFolder, config.auth.serverCertFilename).toString
val keyPath = Paths.get(config.auth.serverCertFolder, config.auth.serverCertKeyFilename).toString
if (config.auth.enableClientAuth) getSecureServerWithClientAuthBuilder(MuFnServer.port, certPath, keyPath, config.auth.trustStorePath)
else getSecureServerBuilder(MuFnServer.port, certPath, keyPath, config.auth.trustStorePath)
} else getInsecureServerBuilder(MuFnServer.port)
And my prometheus setup in pod-spec is as below:
template:
metadata:
annotations:
"prometheus.io/scrape": "true"
"prometheus.io/port": "8888"
"prometheus.io/path": "/metrics"
labels:
app.kubernetes.io/name: mufn-service
ginku.opentelemetry.onboard: "true"
The text was updated successfully, but these errors were encountered: