@@ -29,12 +29,10 @@ public class PrometheusRegistry {
2929 /** Stores the registration details for a Collector at registration time. */
3030 private static class CollectorRegistration {
3131 final String prometheusName ;
32- final MetricType metricType ;
3332 final Set <String > labelNames ;
3433
35- CollectorRegistration (String prometheusName , MetricType metricType , Set <String > labelNames ) {
34+ CollectorRegistration (String prometheusName , @ Nullable Set <String > labelNames ) {
3635 this .prometheusName = prometheusName ;
37- this .metricType = metricType ;
3836 this .labelNames =
3937 (labelNames == null || labelNames .isEmpty ()) ? Collections .emptySet () : labelNames ;
4038 }
@@ -46,13 +44,10 @@ private static class CollectorRegistration {
4644 */
4745 private static class MultiCollectorRegistration {
4846 final String prometheusName ;
49- final MetricType metricType ;
5047 final Set <String > labelNames ;
5148
52- MultiCollectorRegistration (
53- String prometheusName , MetricType metricType , Set <String > labelNames ) {
49+ MultiCollectorRegistration (String prometheusName , @ Nullable Set <String > labelNames ) {
5450 this .prometheusName = prometheusName ;
55- this .metricType = metricType ;
5651 this .labelNames =
5752 (labelNames == null || labelNames .isEmpty ()) ? Collections .emptySet () : labelNames ;
5853 }
@@ -138,16 +133,6 @@ boolean isEmpty() {
138133 MetricType getType () {
139134 return type ;
140135 }
141-
142- @ Nullable
143- String getHelp () {
144- return help ;
145- }
146-
147- @ Nullable
148- Unit getUnit () {
149- return unit ;
150- }
151136 }
152137
153138 public void register (Collector collector ) {
@@ -195,8 +180,7 @@ public void register(Collector collector) {
195180 }
196181 });
197182
198- collectorMetadata .put (
199- collector , new CollectorRegistration (prometheusName , metricType , labelNames ));
183+ collectorMetadata .put (collector , new CollectorRegistration (prometheusName , labelNames ));
200184 }
201185
202186 if (prometheusName != null ) {
@@ -256,7 +240,7 @@ public void register(MultiCollector collector) {
256240 }
257241 });
258242
259- registrations .add (new MultiCollectorRegistration (prometheusName , metricType , labelNames ));
243+ registrations .add (new MultiCollectorRegistration (prometheusName , labelNames ));
260244 }
261245
262246 prometheusNames .add (prometheusName );
0 commit comments