Skip to content

Commit ceec9d7

Browse files
authored
Merge pull request #17 from weaveworks/rm-redirect-middleware
Remove redirect middleware - it doesn't work.
2 parents 4eff863 + eea7eea commit ceec9d7

File tree

2 files changed

+3
-49
lines changed

2 files changed

+3
-49
lines changed

instrument/instrument.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ func TimeRequestHistogramStatus(ctx context.Context, method string, metric *prom
4848
ext.Error.Set(sp, true)
4949
}
5050
sp.Finish()
51-
metric.WithLabelValues(method, toStatusCode(err)).Observe(time.Now().Sub(startTime).Seconds())
51+
if metric != nil {
52+
metric.WithLabelValues(method, toStatusCode(err)).Observe(time.Now().Sub(startTime).Seconds())
53+
}
5254
return err
5355
}

middleware/redirect.go

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)