Skip to content

Prometheux exporter can't expose state store metrics if the topology contains rocksdb and in memory store #218

Closed
@LGouellec

Description

Description

Use this topology with prometheus exporter, all state store metrics are not available due to an internal exception when the exporter try to create gauge ..

IKStream<string, string> stream = builder.Stream<string, string>(inputTopic);
            stream
                .GroupByKey()
                .WindowedBy(TumblingWindowOptions.Of(windowSize))
                .Count()
                .ToStream()
                .To<StringWindowSerdes, Int64SerDes>(outputTopic);

            stream
                .GroupByKey()
                .Count(
                    InMemory.As<string, long>("count-store")
                    .WithKeySerdes<StringSerDes>()
                    .WithValueSerdes<Int64SerDes>());

Workaround

  • Use OpenTelemetry exporter package with Prometheus exporter, it works !
config.UseOpenTelemetryReporter((builder) =>
            {
                builder.AddPrometheusExporter((options) =>
                {
                    options.StartHttpListener = true;
                    // Use your endpoint and port here
                    options.HttpListenerPrefixes = new string[] {$"http://localhost:{9099}/"};
                    options.ScrapeResponseCacheDurationMilliseconds = 0;
                });
            }, true);

Metadata

Assignees

No one assigned

    Labels

    1.5.0bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions