How to add labels to Prometheus Summary metric in Java
You need to provide the labelname in the metric:
private static final Summary latencySummary = Summary.build()
.name("latency_seconds")
.help("All latencies.")
.labelNames("api")
.register();