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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes3
Signed-off-by: Samhith Kakarla <[email protected]>
  • Loading branch information
samhith-kakarla committed Jul 17, 2024
commit 18e96665fbf073ca47017955fc4d19aa43026a91
1 change: 1 addition & 0 deletions docs/operations/metrics/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ These metrics can be used to determine the latency of your pipeline.

| Metric name | Metric type | Labels | Description |
| ---------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |------------------------------------------------------------------------------------------------|
| `pipeline_lag_milliseconds` | Gauge| `pipeline=<pipeline-name>` | Provides the pipeline processing lag in milliseconds |
| `source_forwarder_transformer_processing_time` | Histogram | `pipeline=<pipeline-name>` <br> `vertex=<vertex-name>` <br> `vertex_type=<vertex-type>` <br> `replica=<replica-index>` <br> `partition_name=<partition-name>` | Provides a histogram distribution of the processing times of User-defined Source Transformer |
| `forwarder_udf_processing_time` | Histogram | `pipeline=<pipeline-name>` <br> `vertex=<vertex-name>` <br> `vertex_type=<vertex-type>` <br> `replica=<replica-index>` | Provides a histogram distribution of the processing times of User-defined Functions. (UDF's) |
| `forwarder_forward_chunk_processing_time` | Histogram | `pipeline=<pipeline-name>` <br> `vertex=<vertex-name>` <br> `vertex_type=<vertex-type>` <br> `replica=<replica-index>` | Provides a histogram distribution of the processing times of the forwarder function as a whole |
Expand Down
8 changes: 6 additions & 2 deletions pkg/daemon/server/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ func (ds *daemonServer) exposeLagMetrics(ctx context.Context) {
// if the data hasn't arrived the sink vertex
// set the lag to be -1
if minWM < 0 {
pipelineProcessingLag.WithLabelValues(metrics.LabelPipeline).Set(-1)
pipelineProcessingLag.WithLabelValues(ds.pipeline.Name).Set(-1)
} else {
pipelineProcessingLag.WithLabelValues(metrics.LabelPipeline).Set(float64(maxWM - minWM))
if maxWM < minWM {
pipelineProcessingLag.WithLabelValues(ds.pipeline.Name).Set(-1)
} else {
pipelineProcessingLag.WithLabelValues(ds.pipeline.Name).Set(float64(maxWM - minWM))
}
}
case <-ctx.Done():
return
Expand Down
Loading