public OpenTelemetry getOpenTelemetry() {
        return openTelemetrySdkReference.get();
    }
@Test
    public void testMetricCardinalityIsSet() {
        var prometheusExporterPort = 9464;
        @Cleanup
        var ots = OpenTelemetryService.builder()
                .builderCustomizer(getBuilderCustomizer(null,
                        Map.of(OpenTelemetryService.OTEL_SDK_DISABLED_KEY, "false",
                        "otel.metrics.exporter", "prometheus",
                        "otel.exporter.prometheus.port", Integer.toString(prometheusExporterPort))))
                .clusterName("openTelemetryServiceCardinalityTestCluster")
                .build();
        var meter = ots.getOpenTelemetry().getMeter("openTelemetryMetricCardinalityTest");
        var counter = meter.counterBuilder("dummyCounter").build();
        for (int i = 0; i < OpenTelemetryService.MAX_CARDINALITY_LIMIT + 100; i++) {
            counter.add(1, Attributes.of(AttributeKey.stringKey("attribute"), "value" + i));
        }

        Awaitility.waitAtMost(30, TimeUnit.SECONDS).ignoreExceptions().until(() -> {
            var client = new PrometheusMetricsClient("localhost", prometheusExporterPort);
            var allMetrics = client.getMetrics();
            var actualMetrics = allMetrics.findByNameAndLabels("dummyCounter_total");
            var overflowMetric = allMetrics.findByNameAndLabels("dummyCounter_total", "otel_metric_overflow", "true");
            return actualMetrics.size() == OpenTelemetryService.MAX_CARDINALITY_LIMIT + 1 && overflowMetric.size() == 1;
        });
    }