Skip to content

Commit

Permalink
fixup! chore: emit metrics using transformer response headers. TODO: …
Browse files Browse the repository at this point in the history
…cleanup
  • Loading branch information
Sidddddarth committed Jan 28, 2025
1 parent 2d55fc4 commit 628b601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processor/transformer/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,9 @@ func (trans *handle) doPost(ctx context.Context, rawJSON []byte, url, stage stri
newTags["instanceWorker"] = instanceWorker
trans.stat.NewTaggedStat("processor_transformer_instance_event_count", stats.CountType, newTags).Count(numEvents)
dur := time.Since(requestStartTime).Milliseconds()
headerTime, err := strconv.Atoi(headerResponseTime)
headerTime, err := strconv.ParseFloat(strings.TrimSuffix(headerResponseTime, "ms"), 64)
if err == nil {
diff := dur - int64(headerTime)
diff := float64(dur) - headerTime
trans.stat.NewTaggedStat("processor_tranform_duration_diff_time", stats.TimerType, newTags).SendTiming(time.Duration(diff) * time.Millisecond)

Check failure on line 528 in processor/transformer/transformer.go

View workflow job for this annotation

GitHub Actions / lint

`tranform` is a misspelling of `transform` (misspell)
}
}
Expand Down

0 comments on commit 628b601

Please sign in to comment.