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

refactor(core)!: Add observe layer as building block #5064

Merged
merged 3 commits into from
Aug 28, 2024
Merged

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Aug 27, 2024

Which issue does this PR close?

Related to #5049

Rationale for this change

What changes are included in this PR?

Add a new mod called opendal::layers::observe. In which we will provide:

  • observe::MetricsIntercept: A trait that users can implement metrics intercept.
  • observe::MetricsLayer: A layer that based on MetricsIntercept.

Based on observe mod, all our existing metrics related crates can implement:

  • MetricsLayer = observe::MetricsLayer<MetricsInterceptor>
  • PrometheusClientLayer = observe::MetricsLayer<PrometheusClientInterceptor>
  • PrometheusLayer = observe::MetricsLayer<PrometheusInterceptor>

All of them will share the exactly same behavior. Users only need to configure the Interceptor directly.

Are there any user-facing changes?

API Breaking Changes

Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo Xuanwo changed the title poc of opendal observe layers refactor(core): Add observe layer as building block Aug 28, 2024
@Xuanwo Xuanwo changed the title refactor(core): Add observe layer as building block refactor(core)!: Add observe layer as building block Aug 28, 2024
@Xuanwo Xuanwo changed the title refactor(core)!: Add observe layer as building block refactor(core)!: Add observe layer as building block Aug 28, 2024
@Xuanwo Xuanwo requested review from Zheaoli, tisonkun and PsiACE August 28, 2024 10:03
@Xuanwo Xuanwo marked this pull request as ready for review August 28, 2024 10:04
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
Member Author

Xuanwo commented Aug 28, 2024

Hi, @koushiro. Would you like to continue this work and migrate it to the MetricsLayer and PrometheusLayer as well?

I believe we can address the existing problems at the same time.

@koushiro
Copy link
Member

Hi, @koushiro. Would you like to continue this work and migrate it to the MetricsLayer and PrometheusLayer as well?

I believe we can address the existing problems at the same time.

Yeah, I'd like to.

BTW, maybe the related issue link that you mentioned in the description is wrong?

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.

3 participants