-
Notifications
You must be signed in to change notification settings - Fork 4k
ts: record child metrics with low frequency poller #158148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
ts: record child metrics with low frequency poller #158148
Conversation
| if m.EnableLowFreqChildCollection == nil { | ||
| return true | ||
| } | ||
| return *m.EnableLowFreqChildCollection | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chose to default this to true because I think it would be quite painful to manually turn this on for each metric
| // Record child metrics from app registry for system tenant only. | ||
| now := mr.clock.Now() | ||
| recorder := registryRecorder{ | ||
| registry: mr.mu.appRegistry, | ||
| format: nodeTimeSeriesPrefix, | ||
| source: mr.mu.desc.NodeID.String(), | ||
| timestampNanos: now.UnixNano(), | ||
| } | ||
| recorder.recordChangefeedChildMetrics(&data) | ||
|
|
||
| // Record child metrics from app-level registries for secondary tenants | ||
| for tenantID, r := range mr.mu.tenantRegistries { | ||
| tenantRecorder := registryRecorder{ | ||
| registry: r, | ||
| format: nodeTimeSeriesPrefix, | ||
| source: tsutil.MakeTenantSource(mr.mu.desc.NodeID.String(), tenantID.String()), | ||
| timestampNanos: now.UnixNano(), | ||
| } | ||
| tenantRecorder.recordChangefeedChildMetrics(&data) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changefeed metrics only live on app registry (and tenant app registry)
| for i, label := range childMetric.Label { | ||
| sanitizedLabels[i].key = metric.ExportedLabel(label.GetName()) | ||
| sanitizedLabels[i].value = label.GetValue() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is aligned with prometheus export:
keys are cleaned and values are preserved
| 12, | ||
| "/System/tsd//1m/1924-09-18T08:00:00Z/", | ||
| }, | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prove that keys can have special characters
This change adds the ability to get changefeed child metrics to be recorded. The child metrics have their names augmented with their labels. Epic: CRDB-55079 Release: None
4748184 to
2c02b81
Compare
This change adds the ability to get changefeed child metrics to be recorded. The child metrics have their names augmented with their labels.
Epic: CRDB-55079
Release: None