From c0b65b68966fd2ad54471867b6dff277db226e53 Mon Sep 17 00:00:00 2001 From: joshblakeley Date: Mon, 24 Sep 2018 14:12:13 +0100 Subject: [PATCH] append apiid to tracked endpoints --- analytics.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/analytics.go b/analytics.go index 30a17fd910a..c9ce8b17564 100644 --- a/analytics.go +++ b/analytics.go @@ -277,6 +277,10 @@ func (r *RedisAnalyticsHandler) recordWorker() { if !strings.HasPrefix(record.RawPath, "/") { record.RawPath = "/" + record.RawPath } + //if tracking path prepend apiid for grouping in aggregate queries + if record.TrackPath { + record.Path = record.APIID + record.Path + } if encoded, err := msgpack.Marshal(record); err != nil { log.WithError(err).Error("Error encoding analytics data")