Skip to content

feat(layer/prometheus): Support output path as a metric label#3335

Merged
Xuanwo merged 1 commit intoapache:mainfrom
Zheaoli:manjusaka/prometheus-path-label
Oct 21, 2023
Merged

feat(layer/prometheus): Support output path as a metric label#3335
Xuanwo merged 1 commit intoapache:mainfrom
Zheaoli:manjusaka/prometheus-path-label

Conversation

@Zheaoli
Copy link
Copy Markdown
Member

@Zheaoli Zheaoli commented Oct 18, 2023

For now, we already have basic metric output in the Prometheus layer.

  1. requests_total
  2. requests_duration_seconds
  3. bytes_total

All the metrics are grouped by scheme and operation for now.

For now, in some circumstances, we need to group by the metric by an extra path. Here's an example: if we choose to write to different devices in Linux using OpenDAL, and one of the devices has some problem, the write and read action becomes slow and slow. We can't monitor and alert for the specific device if we don't have a path label.

But on the other hand, if we output all the paths as a label in metric, the final metric we get will be extremely massive. So I chose to introduce a new config option for the people to choose how many path levels they want to export

@Zheaoli Zheaoli requested a review from Xuanwo as a code owner October 18, 2023 06:20
@github-actions github-actions Bot added the releases-note/feat The PR implements a new feature or has a title that begins with "feat" label Oct 18, 2023
@Zheaoli Zheaoli force-pushed the manjusaka/prometheus-path-label branch from bce7287 to ae47b29 Compare October 18, 2023 06:23
Comment thread core/src/layers/prometheus.rs
Comment thread core/src/layers/prometheus.rs Outdated
Comment thread core/src/layers/prometheus.rs Outdated
@Zheaoli Zheaoli force-pushed the manjusaka/prometheus-path-label branch from 7011430 to 2175906 Compare October 19, 2023 14:04
@Zheaoli Zheaoli requested a review from Xuanwo October 19, 2023 14:05
Comment thread core/src/layers/prometheus.rs
Comment thread core/src/layers/prometheus.rs
Comment thread core/src/layers/prometheus.rs Outdated
Comment thread core/src/layers/prometheus.rs Outdated
Comment thread core/src/layers/prometheus.rs Outdated
Comment thread core/src/layers/prometheus.rs
@Zheaoli Zheaoli force-pushed the manjusaka/prometheus-path-label branch from c8e9df2 to 6c8456f Compare October 20, 2023 16:22
Signed-off-by: Manjusaka <me@manjusaka.me>
@Zheaoli Zheaoli force-pushed the manjusaka/prometheus-path-label branch from 6c8456f to 3281dde Compare October 20, 2023 18:11
Copy link
Copy Markdown
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks!

@Xuanwo Xuanwo merged commit e48968b into apache:main Oct 21, 2023
@Zheaoli Zheaoli deleted the manjusaka/prometheus-path-label branch October 21, 2023 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants