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

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

Merged
merged 1 commit into from
Oct 21, 2023

Conversation

Zheaoli
Copy link
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

core/src/layers/prometheus.rs Show resolved Hide resolved
core/src/layers/prometheus.rs Outdated Show resolved Hide resolved
core/src/layers/prometheus.rs Show resolved Hide resolved
core/src/layers/prometheus.rs Show resolved Hide resolved
core/src/layers/prometheus.rs Outdated Show resolved Hide resolved
core/src/layers/prometheus.rs Outdated Show resolved Hide resolved
core/src/layers/prometheus.rs Outdated Show resolved Hide resolved
core/src/layers/prometheus.rs Show resolved Hide resolved
@Zheaoli Zheaoli force-pushed the manjusaka/prometheus-path-label branch from c8e9df2 to 6c8456f Compare October 20, 2023 16:22
@Zheaoli Zheaoli force-pushed the manjusaka/prometheus-path-label branch from 6c8456f to 3281dde Compare October 20, 2023 18:11
Copy link
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
106 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants