Skip trace for router healthz endpoint (#1400)

Jaeger preserves the trace data of router healthz endpoints
which is not so helpful for monitoring function metrics and
consumes storage to store such trace data.

This PR uses `GetStartOptions` to examine the request's path and
check if it's a request to healthz endpoint. If yes, skip and not
to trace it.
This commit is contained in:
Ta-Ching Chen
2019-11-12 00:13:17 +08:00
committed by GitHub
parent 19e693bf52
commit 4474f5f813
6 changed files with 45 additions and 5 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ func TestRouter(t *testing.T) {
tracingSamplingRate := .5
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go serve(ctx, logger, port, tracingSamplingRate, triggers, frr)
go serve(ctx, logger, port, tracingSamplingRate, triggers, frr, false)
time.Sleep(100 * time.Millisecond)
// hit the router