-
Notifications
You must be signed in to change notification settings - Fork 28
Introduce AutoMonitor for simpler enablement of Application Signals #309
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…h AutoMonitor and AnnotationMutators, check if safe to mutate before applying custom selector, run opt out tests for each type of workload, test opt out by disabling monitorallservices
CustomSelectors should obey autoRestart, autoAnnotateAutoInstrumentation shouldn't. Rename MonitorInterface to InstrumentationAnnotator. Add docs.
…ntation container validation by default. This is required for automonitor to work, because it tries to apply all init containers to each selected pod.
… update pod templates in workloads.
…el custom selector should not update pod template
…art namespace for autoAnnotateAutoInstrumentation.
a namespaced name of a "namespace-a" is just "namespace-a", not "namespace-a/namespace-a"
…hNamespaces so Monitor's MutateAndPatchAll can trigger different behavior separately based on RestartPods
…el if automonitor is enabled. this prevents multi instrumentation unit tests from failing
…il.go in auto package. Add unit tests
sky333999
approved these changes
May 9, 2025
lisguo
approved these changes
May 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
duplicate of: #297
Description of changes: Introduce Auto Monitor for Application Signals on K8s which provides an easier onboarding experience. When enabled, the Operator can auto-instrument K8s workloads that are associated with K8s services as they come up automatically without requiring explicit opt-in via workload specific annotations.
The operator now accepts a new arg
auto-monitor-config
that has the following structure:monitorAllServices
: Enable AutoMonitor for all services in the cluster i.e. for any K8s workloads that are brought up in the cluster, auto-instrument them. Defaults to false i.e. not enabled.langugages
: Specify the list of languages that AutoMonitor should inject auto-instrumentation for. Defaults to all supported languages.restartPods
: When enabled, restart pods that are already running on the cluster corresponding to K8s workloads that now fall under the scope of AutoMonitor. Defaults to false i.e. not enabled.customSelector
: Provides more granular control to explicitly specify namespaces and workloads that should be auto-instrumented. Can be specified even ifmonitorAllServices
is disabled.exclude
: Similar tocustomSelector
, but is instead used to deny specific namespaces or workloads from getting auto-instrumented whenmonitorAllServices
is enabled. Takes precedence overcustomSelector
in the case of conflicts.Additional Notes:
customSelector
withrestartPods
enabled serves as a replacement for the existingauto-annotation-config
arg.auto-annotation-config
will be deprecated entirely in a future release. Using both is consider invalid and will continue to respectauto-annotation-config
in such scenarios.monitorAllServices
by default does not auto-instrument services in thekube-system
andamazon-cloudwatch
namespaces. If you require services in these namespaces to be auto-instrumented, you can explicitly specify them usingcustomSelector
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.