Configuration layer similar to .NET ILogger configuration to control individual meter states
Feature Request
Support controlling meter state for individual meters via configuration similar to how .NET ILogger configuration let's you configure log level based on logger.
i.e. One should be able to control meter states something like
{
"MeterState": "Enabled", // Default state for all meters is enabled, Use the override to override further
"MeterStateOverrides": {
"X.Y.Z": "Disabled",
"X.Y.Z.ABC": "Enabled",
"A.B": "Disabled"
}
}
or can follow the same model as logging, something like
{
"Metering": {
"MeterState": {
"Default": "Enabled",
"X.Y.Z": "Disabled",
"X.Y.Z.ABC": "Enabled",
"A.B": "Disabled",
}
}
}
Is your feature request related to a problem? Yes.
If so, provide a concise description of the problem. Currently, there is no easy way to control these things via configuration and controlling these requires code changes. In our services almost everything is controllable via configuration for better control.
Describe the solution you'd like:
What do you want to happen instead? What is the expected behavior?
Describe alternatives you've considered.
Wrote our own configuration layer on top to achieve this.
Additional Context
Add any other context about the feature request here.
AddMeter(ABC.).AddMeter(XYZ.) etc - are these not sufficient? You can read the list of MeterNames from IConfiguration and feed it to AddMeter([]metername) - won't that work? The ILogger filter capability is not something OTel provides, and the AddMeter functionality is matching the AddSource functionality today.
@dpk83 please check https://github.com/open-telemetry/oteps/pull/225. There is an ongoing discussion how to make configuration in the file. I am not sure if all your needs will be addressed, but worth to check and give feedback.
This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.
Closed as inactive. Feel free to reopen if this issue is still a concern.