From 433fabb0e565487c627358aceea0061b719829c3 Mon Sep 17 00:00:00 2001 From: emoscovici Date: Sun, 24 Dec 2023 13:03:10 +0200 Subject: [PATCH] log client_faced Grafana metrics --- .../java/com/datorama/oss/timbermill/pipe/LocalOutputPipe.java | 2 ++ .../datorama/timbermill/server/service/TimbermillService.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/timbermill-java/timbermill-local/src/main/java/com/datorama/oss/timbermill/pipe/LocalOutputPipe.java b/timbermill-java/timbermill-local/src/main/java/com/datorama/oss/timbermill/pipe/LocalOutputPipe.java index 788e79ad..9229a6fb 100644 --- a/timbermill-java/timbermill-local/src/main/java/com/datorama/oss/timbermill/pipe/LocalOutputPipe.java +++ b/timbermill-java/timbermill-local/src/main/java/com/datorama/oss/timbermill/pipe/LocalOutputPipe.java @@ -127,8 +127,10 @@ public static void doPushEventToQueues(PersistenceHandler persistenceHandler, Bl LOG.info("ClientFacingEvents | LocalOutputPipe | clientFacingEventsRegex is NOT null"); if (Pattern.compile(clientFacingEventsRegex).matcher(event.getName()).matches()) { KamonConstants.MESSAGES_IN_INPUT_QUEUE_RANGE_SAMPLER.withTag("client_facing", true).increment(); + LOG.info("MESSAGES_IN_INPUT_QUEUE_RANGE_SAMPLER event name {} was sent to Grafana with tag client_facing=true", event.getName()); } else { KamonConstants.MESSAGES_IN_INPUT_QUEUE_RANGE_SAMPLER.withTag("client_facing", false).increment(); + LOG.info("MESSAGES_IN_INPUT_QUEUE_RANGE_SAMPLER event name {} was sent to Grafana with tag client_facing=false", event.getName()); } } else { LOG.info("ClientFacingEvents | LocalOutputPipe | clientFacingEventsRegex is null"); diff --git a/timbermill-java/timbermill-server/src/main/java/com/datorama/timbermill/server/service/TimbermillService.java b/timbermill-java/timbermill-server/src/main/java/com/datorama/timbermill/server/service/TimbermillService.java index 9c8a6a08..7d2f4bc0 100644 --- a/timbermill-java/timbermill-server/src/main/java/com/datorama/timbermill/server/service/TimbermillService.java +++ b/timbermill-java/timbermill-server/src/main/java/com/datorama/timbermill/server/service/TimbermillService.java @@ -116,7 +116,7 @@ public TimbermillService(@Value("${INDEX_BULK_SIZE:200000}") Integer indexBulkSi @Value("${LIMIT_FOR_PERIOD:30000}") int limitForPeriod, @Value("${LIMIT_REFRESH_PERIOD_MINUTES:1}") int limitRefreshPeriod, @Value("${RATE_LIMITER_CAPACITY:1000000}") int rateLimiterCapacity, - @Value("${client.facing.events.regex:}") String clientFacingEventsRegex, + @Value("${client.facing.events.regex:(account_analytics.*)|(page_view.*)|(validate_login)|(last_workspace_update)|(interactive_dingo_query)|(widget_init)|(widget_rendered)|(page_load)|(iframe_route_states_log)|(workspace_analytics_average_query_load_time)|(top_workspace_analytics_orphan_count)|(workspace_analytics_orphan_count)}") String clientFacingEventsRegex, @Value("${skip.events.at.insert.flag:false}") boolean skipEventsAtInsertFlag, @Value("${skip.events.at.drain.flag:false}") boolean skipEventsAtDrainFlag, @Value("${not.to.skip.events.regex:.*}") String notToSkipRegex){