Skip to content

Commit

Permalink
Fix online metrics for exception counts
Browse files Browse the repository at this point in the history
  • Loading branch information
hzding621 committed Oct 3, 2023
1 parent 3e854df commit f9031d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class ExternalSourceRegistry extends Serializable {
responses.map { responses =>
val failures = responses.count(_.values.isFailure)
ctx.histogram("response.latency", System.currentTimeMillis() - startTime)
ctx.histogram("response.failures", failures)
ctx.histogram("response.successes", responses.size - failures)
ctx.count("response.failures", failures)
ctx.count("response.successes", responses.size - failures)
responses
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion online/src/main/scala/ai/chronon/online/Fetcher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class Fetcher(val kvStore: KVStore,
Metrics.Context(environment = Environment.JoinFetching,
join = validRequests.iterator.map(_.name.sanitize).toSeq.distinct.mkString(","))
context.histogram("response.external_pre_processing.latency", System.currentTimeMillis() - startTime)
context.histogram("response.external_invalid_joins.count", invalidCount)
context.count("response.external_invalid_joins.count", invalidCount)
val responseFutures = externalSourceRegistry.fetchRequests(validExternalRequestToJoinRequestMap.keys.toSeq, context)

// step-3 walk the response, find all the joins to update and the result map
Expand Down

0 comments on commit f9031d4

Please sign in to comment.