-
Notifications
You must be signed in to change notification settings - Fork 931
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
Show the FQDN instance in prometheus metrics #6863
Conversation
38664ab
to
5b8db1e
Compare
5b8db1e
to
17b7007
Compare
sb.append( | ||
s"${prefix}{quantile=\"0.99\",type=\"timers\",$instanceLabel} ${snapshot.get99thPercentile()}\n") | ||
sb.append( | ||
s"${prefix}{quantile=\"0.999\",type=\"timers\",$instanceLabel} ${snapshot.get999thPercentile()}\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before, timer example:
# HELP kyuubi_backend_service_execute_statement Generated from Dropwizard metric import (metric=kyuubi.backend_service.execute_statement, type=com.codahale.metrics.Timer)
# TYPE kyuubi_backend_service_execute_statement summary
kyuubi_backend_service_execute_statement{quantile="0.5",} 0.038373501000000004
kyuubi_backend_service_execute_statement{quantile="0.75",} 0.039456969
kyuubi_backend_service_execute_statement{quantile="0.95",} 0.041447420000000006
kyuubi_backend_service_execute_statement{quantile="0.98",} 0.042374208000000003
kyuubi_backend_service_execute_statement{quantile="0.99",} 0.05199264000000001
kyuubi_backend_service_execute_statement{quantile="0.999",} 0.10801610800000001
kyuubi_backend_service_execute_statement_count 815642.0
} | ||
} | ||
registry.getCounters.asScala.foreach { case (k, v) => | ||
sb.append(s"${normalizeKey(k)}$countersLabel ${v.getCount}\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gauge and counter example before:
# HELP kyuubi_connection_opened_b_citrst Generated from Dropwizard metric import (metric=kyuubi.connection.opened.b_citrst, type=com.codahale.metrics.Counter)
# TYPE kyuubi_connection_opened_b_citrst gauge
kyuubi_connection_opened_b_citrst 0.0
sb.append(s"${prefix}{quantile=\"0.98\",type=\"histograms\",$instanceLabel} ${snapshot.get98thPercentile()}\n") | ||
sb.append(s"${prefix}{quantile=\"0.99\",type=\"histograms\",$instanceLabel} ${snapshot.get99thPercentile()}\n") | ||
sb.append(s"${prefix}{quantile=\"0.999\",type=\"histograms\",$instanceLabel} ${snapshot.get999thPercentile()}\n") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example before:
# HELP kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo Generated from Dropwizard metric import (metric=kyuubi.operation.exec_time.ExecuteStatement.hermesrno.yuanqguo, type=com.codahale.metrics.Histogram)
# TYPE kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo summary
kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo{quantile="0.5",} 0.0
kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo{quantile="0.75",} 0.0
kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo{quantile="0.95",} 0.0
kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo{quantile="0.98",} 0.0
kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo{quantile="0.99",} 0.0
kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo{quantile="0.999",} 0.0
kyuubi_operation_exec_time_ExecuteStatement_hermesrno_yuanqguo_count 1.0
val prefix = normalizeKey(kv.getKey) | ||
val meter = kv.getValue | ||
sb.append(s"${prefix}$metersLabel ${meter.getCount}\n") | ||
sb.append(s"${prefix}_MeanRate$metersLabel ${meter.getMeanRate}\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meter example before
# HELP kyuubi_operation_state_initialized_total Generated from Dropwizard metric import (metric=kyuubi.operation.state.initialized, type=com.codahale.metrics.Meter)
# TYPE kyuubi_operation_state_initialized_total counter
kyuubi_operation_state_initialized_total 1371702.0
fcee248
to
02722bf
Compare
02722bf
to
4239594
Compare
Why are the changes needed?
The instance list shown in the new added grafana dashboard is not human readable.
In this PR, I try to add instance label with FQDN in the prometheus metrics.
How was this patch tested?
I will check the metrics for before and after to keep the compatibility.
Was this patch authored or co-authored using generative AI tooling?