Skip to content

Commit 26ea041

Browse files
authored
Merge pull request #129 from MrAnno/fix-stats-assert
stats-query: fix assert and showing timestamps
2 parents 883ad51 + d7a8263 commit 26ea041

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

lib/stats/stats-query.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ _process_counter_if_matching(StatsCluster *sc, gint type, StatsCounterItem *coun
9494
static void
9595
_process_counters(StatsCluster *sc, gpointer user_data /*, gboolean* cancelled */)
9696
{
97-
stats_cluster_foreach_counter(sc, _process_counter_if_matching, user_data /*, cancelled*/);
97+
if (stats_cluster_key_is_legacy(&sc->key))
98+
stats_cluster_foreach_counter(sc, _process_counter_if_matching, user_data /*, cancelled*/);
9899
}
99100

100101
static gboolean

lib/stats/stats-registry.c

+1
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ stats_register_associated_counter(StatsCluster *sc, gint type, StatsCounterItem
295295
g_assert(sc->dynamic);
296296

297297
*counter = stats_cluster_track_counter(sc, type);
298+
_update_counter_name_if_needed(*counter, sc, type);
298299
}
299300

300301
void

news/bugfix-129-2.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`syslog-ng-ctl query`: show timestamps and fix `g_pattern_spec_match_string` assert

news/bugfix-129.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`syslog-ng-ctl query`: fix showing Prometheus metrics as unnamed values
2+
3+
`none.value=726685`

0 commit comments

Comments
 (0)