Skip to content

Commit

Permalink
log client_faced Grafana metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
emoscovici committed Dec 24, 2023
1 parent 17e49a3 commit 433fabb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit 433fabb

Please sign in to comment.