-
Notifications
You must be signed in to change notification settings - Fork 113
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
chore: Exposing pipeline processing lag metrics #1839
Conversation
Signed-off-by: Samhith Kakarla <samhith_kakarla@intuit.com>
Signed-off-by: Samhith Kakarla <samhith_kakarla@intuit.com>
Signed-off-by: Samhith Kakarla <samhith_kakarla@intuit.com>
Signed-off-by: Samhith Kakarla <samhith_kakarla@intuit.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1839 +/- ##
==========================================
- Coverage 54.35% 54.24% -0.12%
==========================================
Files 284 285 +1
Lines 28020 28058 +38
==========================================
- Hits 15231 15219 -12
- Misses 11874 11930 +56
+ Partials 915 909 -6 ☔ View full report in Codecov by Sentry. |
pkg/daemon/server/metrics.go
Outdated
|
||
resp, err := ds.metaDataQuery.GetPipelineWatermarks(ctx, &daemon.GetPipelineWatermarksRequest{Pipeline: ds.pipeline.Name}) | ||
if err != nil { | ||
log.Errorw(" failed to calculate lag for pipeline", zap.Error(err)) |
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.
log.Errorw(" failed to calculate lag for pipeline", zap.Error(err)) | |
log.Errorw("Failed to calculate processing lag for pipeline", zap.Error(err)) |
Signed-off-by: Samhith Kakarla <samhith_kakarla@intuit.com>
pkg/daemon/server/metrics.go
Outdated
}, []string{metrics.LabelPipeline}) | ||
) | ||
|
||
func (ds *daemonServer) exposeCTMetrics(ctx context.Context) { |
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.
We can do it in one routine, right?
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.
+1
pkg/daemon/server/metrics.go
Outdated
|
||
var ( | ||
currentTimeToWatermark = promauto.NewGaugeVec(prometheus.GaugeOpts{ | ||
Name: "current_time_compared_to_watermark_milliseconds", |
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.
We need a better metrics name...
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.
@yhl25 - this is the metric you want, right?
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.
yes
pkg/daemon/server/metrics.go
Outdated
|
||
var ( | ||
currentTimeToWatermark = promauto.NewGaugeVec(prometheus.GaugeOpts{ | ||
Name: "current_time_compared_to_watermark_milliseconds", |
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.
yes
pkg/daemon/server/metrics.go
Outdated
) | ||
|
||
func (ds *daemonServer) exposeCTMetrics(ctx context.Context) { |
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.
please add a comment about what this function does.
pkg/daemon/server/metrics.go
Outdated
}, []string{metrics.LabelPipeline}) | ||
) | ||
|
||
func (ds *daemonServer) exposeCTMetrics(ctx context.Context) { |
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.
+1
Signed-off-by: Samhith Kakarla <samhith_kakarla@intuit.com>
pkg/daemon/server/metrics.go
Outdated
} | ||
|
||
if maxWM == math.MinInt64 { | ||
watermarkCmpNow.WithLabelValues(ds.pipeline.Name).Set(0) |
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.
Don't set it to 0, 0 means there's no difference. Let's do -1.
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.
ok
Signed-off-by: Samhith Kakarla <samhith_kakarla@intuit.com>
No description provided.