-
Notifications
You must be signed in to change notification settings - Fork 506
[pkg/instrumentation] Add feature gate for dotnet instrumentation #1629
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
[pkg/instrumentation] Add feature gate for dotnet instrumentation #1629
Conversation
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.
one small wording change
@TylerHelmuth could you please paste here the output of operator's help command? |
|
efd06ab
to
f6e01ab
Compare
@pavolloffay @jaronoff97 added a section to the README detailing the use of the feature gate. |
4dc5811
to
f43d5ea
Compare
@pavolloffay @jaronoff97 ready for another review. I'd like to get this one merge in before #1555 |
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.
LGTM just a minor comment.
|
||
| Language | Gate | Default Value | | ||
|----------|---------------------------------------|-----------------| | ||
| .NET | `operator.autoinstrumentation.dotnet` | enabled | |
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.
how is it disabled? with disabled
value?
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.
iirc you can do --feature-gates=-operator.autoinstrumentation.dotnet
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.
@pavolloffay I added the disabling instructions above the table:
Prefix a gate with '-' to disable support for the corresponding language.
Let me know if I need to tweak the paragraph or table to make things more obvious.
if featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() { | ||
insts.DotNet = inst | ||
} else { | ||
pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for .NET auto instrumentation is not enabled") |
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.
could we keep the log as well?
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.
Sure, I'll add back the error log.
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.
@pavolloffay added back.
…en-telemetry#1629) * Add feature gate for dotnet instrumentation * changelog * Apply feedback * Move gate into featuregate pkg * Add featuregates to info log * Add README entry for the new gate * Write event if feature gate is disabled * Add back error log
This PR puts the dotnet instrumentation behind a feature gate named
operator.autoinstrumentation.dotnet
. This feature gate is enabled by default, but operator managers could disable it if they do not want Instrumentation to be able to inject dotnet instrumentation.I'm using dotnet as the guinea pig, but if the pattern is good I'll submit PRs for the other languages as well.