Skip to content

Commit f897758

Browse files
authored
fix: remove tenant label tagging from profiles to reduce cardinality (#13270)
Signed-off-by: Edward Welch <edward.welch@grafana.com>
1 parent bbc50fd commit f897758

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎pkg/ingester/ingester.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ func (i *Ingester) Push(ctx context.Context, req *logproto.PushRequest) (*logpro
872872

873873
// Set profiling tags
874874
defer pprof.SetGoroutineLabels(ctx)
875-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "write", "tenant", instanceID))
875+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "write"))
876876
pprof.SetGoroutineLabels(ctx)
877877

878878
instance, err := i.GetOrCreateInstance(instanceID)
@@ -947,7 +947,7 @@ func (i *Ingester) Query(req *logproto.QueryRequest, queryServer logproto.Querie
947947

948948
// Set profiling tags
949949
defer pprof.SetGoroutineLabels(ctx)
950-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "log", "tenant", instanceID))
950+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "log"))
951951
pprof.SetGoroutineLabels(ctx)
952952

953953
instance, err := i.GetOrCreateInstance(instanceID)
@@ -1014,7 +1014,7 @@ func (i *Ingester) QuerySample(req *logproto.SampleQueryRequest, queryServer log
10141014

10151015
// Set profiling tags
10161016
defer pprof.SetGoroutineLabels(ctx)
1017-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "metric", "tenant", instanceID))
1017+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "metric"))
10181018
pprof.SetGoroutineLabels(ctx)
10191019

10201020
instance, err := i.GetOrCreateInstance(instanceID)
@@ -1090,7 +1090,7 @@ func (i *Ingester) getChunkIDs(ctx context.Context, req *logproto.GetChunkIDsReq
10901090

10911091
// Set profiling tags
10921092
defer pprof.SetGoroutineLabels(ctx)
1093-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "chunkIDs", "tenant", orgID))
1093+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "chunkIDs"))
10941094
pprof.SetGoroutineLabels(ctx)
10951095

10961096
asyncStoreMaxLookBack := i.asyncStoreMaxLookBack()
@@ -1139,7 +1139,7 @@ func (i *Ingester) Label(ctx context.Context, req *logproto.LabelRequest) (*logp
11391139

11401140
// Set profiling tags
11411141
defer pprof.SetGoroutineLabels(ctx)
1142-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "labels", "tenant", userID))
1142+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "labels"))
11431143
pprof.SetGoroutineLabels(ctx)
11441144

11451145
instance, err := i.GetOrCreateInstance(userID)
@@ -1220,7 +1220,7 @@ func (i *Ingester) series(ctx context.Context, req *logproto.SeriesRequest) (*lo
12201220

12211221
// Set profiling tags
12221222
defer pprof.SetGoroutineLabels(ctx)
1223-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "series", "tenant", instanceID))
1223+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "series"))
12241224
pprof.SetGoroutineLabels(ctx)
12251225

12261226
instance, err := i.GetOrCreateInstance(instanceID)
@@ -1240,7 +1240,7 @@ func (i *Ingester) GetStats(ctx context.Context, req *logproto.IndexStatsRequest
12401240

12411241
// Set profiling tags
12421242
defer pprof.SetGoroutineLabels(ctx)
1243-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "stats", "tenant", user))
1243+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "stats"))
12441244
pprof.SetGoroutineLabels(ctx)
12451245

12461246
instance, err := i.GetOrCreateInstance(user)
@@ -1302,7 +1302,7 @@ func (i *Ingester) GetVolume(ctx context.Context, req *logproto.VolumeRequest) (
13021302

13031303
// Set profiling tags
13041304
defer pprof.SetGoroutineLabels(ctx)
1305-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "volume", "tenant", user))
1305+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "volume"))
13061306
pprof.SetGoroutineLabels(ctx)
13071307

13081308
instance, err := i.GetOrCreateInstance(user)
@@ -1503,7 +1503,7 @@ func (i *Ingester) getDetectedLabels(ctx context.Context, req *logproto.Detected
15031503

15041504
// Set profiling tags
15051505
defer pprof.SetGoroutineLabels(ctx)
1506-
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "detectedLabels", "tenant", userID))
1506+
ctx = pprof.WithLabels(ctx, pprof.Labels("path", "read", "type", "detectedLabels"))
15071507
pprof.SetGoroutineLabels(ctx)
15081508

15091509
instance, err := i.GetOrCreateInstance(userID)

0 commit comments

Comments
 (0)