-
Notifications
You must be signed in to change notification settings - Fork 296
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
Use bitwise combination for metrics options #456
Conversation
This seems over complicated, especially considering some metrics' availability is dependent on the runtime version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can simply start without any options - e.g. AddRuntimeInstrumentation()
will just give you everything that's available to the current runtime/platform. Later if we want to introduce options, we can, and that's not a breaking change.
Do you mean remove all the options? In the current implementation, that's the default behavior if you don't specify any options: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.Runtime#step-2-enable-runtime-instrumentation-at-application-startup |
I asked this because I saw Overall I think it could take time to design these options and it requires a good understanding of usage scenario. I feel a good starting point is to have nothing configurable. |
Agree to have no configurability in the 1st release. Adding the turn off flag later is not a breaking change. |
Exploring option improvement after discussion here #431 (comment)
Changes
Use bitwise combination for metrics options.
Pro:
Con:
.AddRuntimeMetrics()
as enabling all options as default, and after adding an option, say.AddRuntimeMetrics(options => { options.GcEnabled = true; })
, all options other thanGcEnabled
will be disabled.For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes