Skip to content

Commit

Permalink
also increment counter
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsimha committed Jan 31, 2024
1 parent d7decc9 commit 4e7b687
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion online/src/main/scala/ai/chronon/online/Fetcher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,10 @@ class Fetcher(val kvStore: KVStore,
)
if (logFunc != null) {
val sentLog = Try(logFunc.accept(loggableResponse))
if (sentLog.isFailure) logger.error("Failed to publish log", sentLog.failed.get)
if (sentLog.isFailure) {
logger.error("Failed to publish log", sentLog.failed.get)
joinContext.foreach(context => context.increment("logging_failure.count"))
}
joinContext.foreach(context => context.increment("logging_request.count"))
joinContext.foreach(context =>
context.distribution("logging_request.latency.millis", System.currentTimeMillis() - loggingStartTs))
Expand Down

0 comments on commit 4e7b687

Please sign in to comment.