-
Notifications
You must be signed in to change notification settings - Fork 210
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
sysdump: Add "serial" tasks support to enable trace data collection #2052
Conversation
2888dcf
to
ea90ad3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
ea90ad3
to
1ded6c9
Compare
1ded6c9
to
ed99456
Compare
sysdump/sysdump.go
Outdated
@@ -26,6 +25,8 @@ import ( | |||
"k8s.io/apimachinery/pkg/runtime/schema" | |||
"k8s.io/cli-runtime/pkg/genericclioptions" | |||
|
|||
"github.com/cilium/cilium/pkg/versioncheck" |
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 looks like "github.com/cilium/workerpool"
could be placed in this section 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.
I think it should stay in the previous section because it doesn't have a prefix "github.com/cilium/cilium" (in fact, workerpool lives in its own repository).
At least this is the default settings we use for organizing imports in cilium (my IDE is automatically moving it). Are we are using something different in cilium-cli?
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.
Nit: in cilium/cilium and cilium/cilium-cli we AFAIK only use three import groups:
- standard libary
- other 3rd party imports
- imports from the same module
Following the above, I think the github.com/cilium/cilium/pkg/versioncheck
import should stay where it currently is because that package is a 3rd party import from the perspective of this module (github.com/cilium/cilium-cli/sysdump
)
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.
Might be some misconfig in my IDE, then. I'll move it back there 👍
ed99456
to
85540e0
Compare
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. Apologies for the delay.
This comment was marked as outdated.
This comment was marked as outdated.
sysdump/sysdump.go
Outdated
@@ -26,6 +25,8 @@ import ( | |||
"k8s.io/apimachinery/pkg/runtime/schema" | |||
"k8s.io/cli-runtime/pkg/genericclioptions" | |||
|
|||
"github.com/cilium/cilium/pkg/versioncheck" |
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.
Nit: in cilium/cilium and cilium/cilium-cli we AFAIK only use three import groups:
- standard libary
- other 3rd party imports
- imports from the same module
Following the above, I think the github.com/cilium/cilium/pkg/versioncheck
import should stay where it currently is because that package is a 3rd party import from the perspective of this module (github.com/cilium/cilium-cli/sysdump
)
85540e0
to
c98d89c
Compare
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.
Thanks
Add support for "serial" tasks in the sysdump subcommand. Serial tasks are the ones that cannot be executed concurrently with other tasks. One example of such task is the collection of the data from the Go execution tracer, that should not be done while the agent is potentially busy fulfilling requests from other tasks (e.g: collecting and sending profiling data). Signed-off-by: Fabio Falzoi <[email protected]>
Add the ability to scrape trace data from gops. See https://pkg.go.dev/runtime/trace for more information about the Go execution tracer. The overhead derived from enabling the Go execution tracer, while usually low and suitable for production use, might be higher than collecting pprof data, so the option is disabled by default. Signed-off-by: Fabio Falzoi <[email protected]>
c98d89c
to
e4f7508
Compare
See the individual commit messages for further details.