Skip to content

Commit

Permalink
Add counter to track custom order by usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigozhou committed Mar 20, 2023
1 parent 0d0cad4 commit 4a00c46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/metrics/metric_defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1594,6 +1594,7 @@ var (
ElasticsearchBulkProcessorBulkSize = NewDimensionlessHistogramDef("elasticsearch_bulk_processor_bulk_size")
ElasticsearchDocumentParseFailuresCount = NewCounterDef("elasticsearch_document_parse_failures_counter")
ElasticsearchDocumentGenerateFailuresCount = NewCounterDef("elasticsearch_document_generate_failures_counter")
ElasticsearchCustomOrderByClauseCount = NewCounterDef("elasticsearch_custom_order_by_clause_counter")
CatchUpReadyShardCountGauge = NewGaugeDef("catchup_ready_shard_count")
HandoverReadyShardCountGauge = NewGaugeDef("handover_ready_shard_count")
ReplicatorMessages = NewCounterDef("replicator_messages")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ func (s *visibilityStore) setDefaultFieldSort(fieldSorts []*elastic.FieldSort) [
return defaultSorter
}

s.metricsHandler.Counter(metrics.ElasticsearchCustomOrderByClauseCount.GetMetricName()).Record(1)
res := make([]elastic.Sorter, len(fieldSorts)+1)
for i, fs := range fieldSorts {
res[i] = fs
Expand Down

0 comments on commit 4a00c46

Please sign in to comment.