Skip to content

Commit

Permalink
fix metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Yu <yuping@pingcap.com>
  • Loading branch information
pingyu committed Aug 24, 2023
1 parent 2316dd4 commit b6fbf8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cdc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ FAILPOINT_DISABLE := $$(echo $(FAILPOINT_DIR) | xargs $(FAILPOINT) disable >/dev

RELEASE_VERSION ?=
ifeq ($(RELEASE_VERSION),)
RELEASE_VERSION := v1.1-master
RELEASE_VERSION := v1.2-master
release_version_regex := ^cdc-v[0-9]\..*$$
release_branch_regex := "^cdc-[0-9]\.[0-9].*$$|^HEAD$$|^.*/*tags/cdc-v[0-9]\.[0-9]\..*$$"
ifneq ($(shell git rev-parse --abbrev-ref HEAD | egrep $(release_branch_regex)),)
Expand Down
1 change: 1 addition & 0 deletions cdc/cdc/kv/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ func InitMetrics(registry *prometheus.Registry) {
registry.MustRegister(eventFeedGauge)
registry.MustRegister(pullEventCounter)
registry.MustRegister(sendEventCounter)
registry.MustRegister(filterOutEventCounter)

Check warning on line 121 in cdc/cdc/kv/metrics.go

View check run for this annotation

Codecov / codecov/patch

cdc/cdc/kv/metrics.go#L121

Added line #L121 was not covered by tests
registry.MustRegister(clientChannelSize)
registry.MustRegister(clientRegionTokenSize)
registry.MustRegister(cachedRegionSize)
Expand Down
7 changes: 7 additions & 0 deletions cdc/metrics/grafana/tikv-cdc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4837,6 +4837,13 @@
"intervalFactor": 1,
"legendFormat": "{{instance}}-{{type}}",
"refId": "A"
},
{
"expr": "sum(rate(tikv_cdc_kvclient_filter_out_event_count{tidb_cluster=\"$tidb_cluster\", changefeed=~\"$changefeed\"}[1m])) by (instance, type)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "filter-out-{{instance}}-{{type}}",
"refId": "B"
}
],
"thresholds": [],
Expand Down

0 comments on commit b6fbf8d

Please sign in to comment.