Skip to content
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

Merged
merged 25 commits into from
Jul 19, 2024

Conversation

samhith-kakarla
Copy link
Contributor

No description provided.

Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.

Project coverage is 54.24%. Comparing base (e042287) to head (5351aa1).
Report is 2 commits behind head on main.

Files Patch % Lines
pkg/daemon/server/metrics.go 0.00% 47 Missing ⚠️
pkg/daemon/server/daemon_server.go 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
pkg/daemon/server/daemon_server.go Outdated Show resolved Hide resolved
pkg/daemon/server/daemon_server.go Outdated Show resolved Hide resolved
pkg/daemon/server/daemon_server.go Outdated Show resolved Hide resolved
pkg/daemon/server/daemon_server.go Outdated Show resolved Hide resolved
pkg/daemon/server/daemon_server.go Outdated Show resolved Hide resolved
pkg/daemon/server/daemon_server.go Outdated Show resolved Hide resolved
pkg/daemon/server/daemon_server.go Outdated Show resolved Hide resolved
Signed-off-by: Samhith Kakarla <[email protected]>

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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.Errorw(" failed to calculate lag for pipeline", zap.Error(err))
log.Errorw("Failed to calculate processing lag for pipeline", zap.Error(err))

pkg/daemon/server/metrics.go Outdated Show resolved Hide resolved
Signed-off-by: Samhith Kakarla <[email protected]>
@whynowy whynowy changed the title Exposing pipeline processing lag metrics chore: Exposing pipeline processing lag metrics Jul 17, 2024
Signed-off-by: Samhith Kakarla <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
}, []string{metrics.LabelPipeline})
)

func (ds *daemonServer) exposeCTMetrics(ctx context.Context) {
Copy link
Member

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1


var (
currentTimeToWatermark = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "current_time_compared_to_watermark_milliseconds",
Copy link
Member

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...

Copy link
Member

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@whynowy whynowy requested a review from yhl25 July 17, 2024 23:58

var (
currentTimeToWatermark = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "current_time_compared_to_watermark_milliseconds",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Comment on lines 46 to 48
)

func (ds *daemonServer) exposeCTMetrics(ctx context.Context) {
Copy link
Contributor

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.

}, []string{metrics.LabelPipeline})
)

func (ds *daemonServer) exposeCTMetrics(ctx context.Context) {
Copy link
Contributor

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 <[email protected]>
Signed-off-by: Samhith Kakarla <[email protected]>
}

if maxWM == math.MinInt64 {
watermarkCmpNow.WithLabelValues(ds.pipeline.Name).Set(0)
Copy link
Member

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.

Copy link
Contributor Author

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 <[email protected]>
@whynowy whynowy merged commit 55d9d82 into numaproj:main Jul 19, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants