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

Allow users to customize AttributesProcessor and append to exist View #6981

Open
RuoqianXu opened this issue Dec 27, 2024 · 0 comments
Open
Labels
Feature Request Suggest an idea for this project

Comments

@RuoqianXu
Copy link

RuoqianXu commented Dec 27, 2024

Is your feature request related to a problem? Please describe.
I am a framework developer, and my framework integrates the opentelemetry sdk. In my case, I need to trim or perform additional processing on the attributes of all instrument metrics (to adapt to different observability systems). Although I can achieve attribute trimming by registering a View, if there are already existing views, I need to modify all of them. The io.opentelemetry.sdk.metrics.internal.view.AttributesProcessor can solve my problem. However, the current constructor of AttributesProcessor is not public, and the getAttributesProcessor method in the io.opentelemetry.sdk.metrics.View class and the addAttributesProcessor method in the io.opentelemetry.sdk.metrics.ViewBuilder are also not public. Currently, I can only use reflection for handling.

Describe the solution you'd like
Make AttributesProcessor, getAttributesProcessor, and addAttributesProcessor public. hopefully View can be mutable, it is not possible to directly append AttributesProcessor to an existing view now.

Describe alternatives you've considered
Maybe AttributesProcessor can be separated from View, can be registered in SdkMeterProviderBuilder. Similar to View, can use InstrumentSelector to select instrument metrics to apply AttributesProcessors.

@RuoqianXu RuoqianXu added the Feature Request Suggest an idea for this project label Dec 27, 2024
@RuoqianXu RuoqianXu changed the title Allow Allow users to customize AttributesProcessor and append to exist View Dec 27, 2024
@RuoqianXu RuoqianXu reopened this Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

1 participant