Skip to content

Commit

Permalink
ranger metrics: add newrelic trans to request context
Browse files Browse the repository at this point in the history
  • Loading branch information
Muharem Ismailov committed Mar 14, 2019
1 parent 9c86834 commit b640780
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ranger_metrics/newrelic.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ func (newRelic *NewRelic) Middleware(next http.Handler) http.Handler {
txn := newRelic.Application.StartTransaction(r.URL.Path, w, r)
defer txn.End()

ctx := newrelic.NewContext(r.Context(), txn)
r = r.WithContext(ctx)

next.ServeHTTP(txn, r)
}

Expand Down

0 comments on commit b640780

Please sign in to comment.