Skip to content

Commit

Permalink
update DS QueryStats key
Browse files Browse the repository at this point in the history
  • Loading branch information
alextheimer committed Sep 1, 2023
1 parent fac0efb commit 744e438
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import filodb.core.binaryrecord2.RecordSchema
import filodb.core.memstore._
import filodb.core.memstore.ratelimit.{CardinalityManager, CardinalityRecord, QuotaSource}
import filodb.core.metadata.Schemas
import filodb.core.query.{ColumnFilter, Filter, QueryContext, QueryLimitException, QuerySession, QueryWarnings}
import filodb.core.query.{ColumnFilter, Filter, QueryContext, QueryLimitException,
QuerySession, QueryUtils, QueryWarnings}
import filodb.core.store._
import filodb.memory.format.{UnsafeUtils, ZeroCopyUTF8String}
import filodb.memory.format.ZeroCopyUTF8String._
Expand Down Expand Up @@ -353,6 +354,8 @@ class DownsampledTimeSeriesShard(rawDatasetRef: DatasetRef,
val metricGroupBy = deploymentPartitionName +: clusterType +: metricShardKeys.map { col =>
filters.collectFirst {
case ColumnFilter(c, Filter.Equals(filtVal: String)) if c == col => filtVal
case ColumnFilter(c, Filter.EqualsRegex(filtVal: String))
if c == col && !QueryUtils.containsUnescapedNonPipeRegexChars(filtVal) => "multiple"
}.getOrElse("unknown")
}.toList
querySession.queryStats.getTimeSeriesScannedCounter(metricGroupBy).addAndGet(recs.length)
Expand Down

0 comments on commit 744e438

Please sign in to comment.