Skip to content

Commit

Permalink
Merge pull request #58 from foodora/ranger-add-newrelic-trans-to-requ…
Browse files Browse the repository at this point in the history
…est-context

ranger metrics: add newrelic trans to request context
  • Loading branch information
muharem committed Mar 14, 2019
2 parents 9c86834 + b640780 commit f35aa7c
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 f35aa7c

Please sign in to comment.