Skip to content

Commit

Permalink
fix: Correct recording values in opencensus measureMap in HeaderInter…
Browse files Browse the repository at this point in the history
…ceptor (#1726)

* fix: Correct recording values in opencensus measureMap in HeaderInterceptor

* fix: Correct recording values in opencensus measureMap in HeaderInterceptor
  • Loading branch information
KiranmayiB committed Mar 22, 2022
1 parent 2b54949 commit bdb2b89
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ private void processHeader(Metadata metadata, TagContext tagContext) {
if (matcher.find()) {
try {
long latency = Long.parseLong(matcher.group("dur"));
measureMap.put(SPANNER_GFE_LATENCY, latency).record(tagContext);
measureMap.put(SPANNER_GFE_HEADER_MISSING_COUNT, 0L).record(tagContext);
measureMap.put(SPANNER_GFE_LATENCY, latency);
measureMap.put(SPANNER_GFE_HEADER_MISSING_COUNT, 0L);
measureMap.record(tagContext);
} catch (NumberFormatException e) {
LOGGER.log(LEVEL, "Invalid server-timing object in header", matcher.group("dur"));
}
Expand Down

0 comments on commit bdb2b89

Please sign in to comment.