-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kafka metrics : label kafka_version=unknown in native mode #40851
Labels
Milestone
Comments
/cc @alesj (kafka), @cescoffier (kafka), @ebullient (metrics), @jmartisk (metrics), @ozangunalp (kafka), @zakkak (native-image) |
Seems to be an issue in the micrometer binder. The KAfka version is set in: void prepareToBindMetrics(MeterRegistry registry) {
this.metrics.set(this.metricsSupplier.get());
Map<MetricName, ? extends Metric> metrics = this.metrics.get();
// Collect static metrics and tags
Metric startTimeMetric = null;
for (Map.Entry<MetricName, ? extends Metric> entry : metrics.entrySet()) {
MetricName name = entry.getKey();
if (METRIC_GROUP_APP_INFO.equals(name.group()))
if (VERSION_METRIC_NAME.equals(name.name())) {
kafkaVersion = (String) entry.getValue().metricValue();
}
else if (START_TIME_METRIC_NAME.equals(name.name())) {
startTimeMetric = entry.getValue();
}
}
if (startTimeMetric != null) {
MetricName startTimeMetricName = startTimeMetric.metricName();
bindMeter(registry, startTimeMetric, meterName(startTimeMetricName), meterTags(startTimeMetricName));
}
} For some reason, there is no version in native ("unknown" is the default one). |
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jun 18, 2024
Fixes quarkusio#40851 (cherry picked from commit b658288)
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jun 18, 2024
Fixes quarkusio#40851 (cherry picked from commit b658288)
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jun 18, 2024
Fixes quarkusio#40851 (cherry picked from commit b658288)
holly-cummins
pushed a commit
to holly-cummins/quarkus
that referenced
this issue
Jul 31, 2024
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Aug 14, 2024
Fixes quarkusio#40851 (cherry picked from commit b658288)
danielsoro
pushed a commit
to danielsoro/quarkus
that referenced
this issue
Sep 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the bug
In native mode only the property 'kafka_version' does not apppear in the kafka_metrics, the value is always UNKNOWN. this issue does not occur in the jvm mode.
Expected behavior
kafka_consumer_successful_authentication_rate{client_id=.... ",kafka_version="3.7.0"} 0.10734796843969728
Actual behavior
kafka_consumer_successful_authentication_rate{client_id=.... ",kafka_version="unknown"} 0.10734796843969728
How to Reproduce?
mvn clean install -Pnative
/q/metrics
Output of
uname -a
orver
No response
Output of
java -version
21
Quarkus version or git rev
3.10.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.9
Additional information
No response
The text was updated successfully, but these errors were encountered: