-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[featuregate] add Gate.featureGateEnableFunc for --feature-gates registered #9964
Conversation
Thanks @li-zeyuan. Please add a changelog entry. |
Thank you for your review. I have added the changelog |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9964 +/- ##
==========================================
- Coverage 91.72% 91.70% -0.03%
==========================================
Files 359 359
Lines 16634 16642 +8
==========================================
+ Hits 15257 15261 +4
- Misses 1053 1055 +2
- Partials 324 326 +2 ☔ View full report in Codecov by Sentry. |
@@ -107,6 +107,18 @@ func WithRegisterToVersion(toVersion string) RegisterOption { | |||
}) | |||
} | |||
|
|||
// WithRegisterFeatureGateEnableFunc is used to set the Gate "featureGateEnableFunc". | |||
func WithRegisterFeatureGateEnableFunc(f func()) RegisterOption { |
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.
It isn't clear to me what this new public option does. Can you expand in the godoc comments when you would use this option?
if enabled && g.featureGateEnableFunc != nil { | ||
g.featureGateEnableFunc() |
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.
Can you add a unit test that hits this condition?
@djaglowski @TylerHelmuth |
Description:
fix bug: collector start fail with '--feature-gates=logs.jsonParserArray'
how to fix: add Gate.featureGateEnableFunc, called when --feature-gates registered
Link to tracking Issue:
#32313
Testing:
Documentation:
Please delete paragraphs that you did not use before submitting.