Prometheus endpoint is a blank page - using kamon with Prometheus reporter in a Spring Boot app

875 views Asked by At

As the title says, I'm trying to collect system metrics using kamon and expose them to Prometheus.

On http://localhost:9095/, I can briefly see the below message:

# The kamon-prometheus module didn't receive any data just yet.

but after refreshing several times I get a blank page. The kamon status page at http://localhost:5266/#/ shows 38 metrics.

Am I missing something?

My setup is as follows, in my main method, at the very top I have

Kamon.init();

I have added this in my pom:

        <dependency>
            <groupId>io.kamon</groupId>
            <artifactId>kamon-bundle_2.12</artifactId>
            <version>2.0.0</version>
        </dependency>

        <dependency>
            <groupId>io.kamon</groupId>
            <artifactId>kamon-prometheus_2.12</artifactId>
            <version>2.0.0</version>
        </dependency>
2

There are 2 answers

0
Mihail Kostira On

After a tip from the kamon gitter channel(thanks Diego Parra!), changing the dependency versions worked for me.

        <dependency>
            <groupId>io.kamon</groupId>
            <artifactId>kamon-bundle_2.12</artifactId>
            <version>2.0.5</version>
        </dependency>

        <dependency>
            <groupId>io.kamon</groupId>
            <artifactId>kamon-prometheus_2.12</artifactId>
            <version>2.0.1</version>
        </dependency>
0
JamesWillett On

The key change to fixing this is updating kamon-prometheus to version 2.0.1

As mentioned here: https://github.com/kamon-io/Kamon/issues/566