-
Notifications
You must be signed in to change notification settings - Fork 123
Add process metadata file for work with eBPF agent #156
Conversation
reporter/process.go
Outdated
|
||
// Report the current process metadata to local file | ||
// using to work with eBPF agent | ||
func reportProcessIFNeed(r *gRPCReporter) { |
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 we need a very clear option for this new feature. Labels are optional, this should not
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.
And please document clearly what file(s) is being created, and which information would be written.
Then when the rover side doc is ready, this should link to there for further information.
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 we need a very clear option for this new feature. Labels are optional, this should not
Yes, this function is not optional, maybe the function name let you feel confused. updated.
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.
And please document clearly what file(s) is being created, and which information would be written. Then when the rover side doc is ready, this should link to there for further information.
Updated. After this merge, I will update the documentation on the rover side and finally link the document there.
Codecov Report
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
- Coverage 71.02% 64.83% -6.20%
==========================================
Files 21 22 +1
Lines 994 1089 +95
==========================================
Hits 706 706
- Misses 236 329 +93
- Partials 52 54 +2
Continue to review full report at Codecov.
|
@@ -264,5 +264,36 @@ Golang agent supports the following dynamic configurations. | |||
|:-----------------:|:----------------------------------------------------------------------------------------:|:--------------------:| | |||
| agent.sample_rate | The percentage of trace when sampling. It's `[0, 1]`, Same with `WithSampler` parameter. | 0.1 | | |||
|
|||
## Process | |||
|
|||
This feature is used in cooperation with the [skywalking-rover](https://github.com/apache/skywalking-rover) project. |
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 you missed one, I suggest this feature(temp files) should be optional and OFF on default.
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 is recommended to enable this feature through environment variable
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.
Updated and let the process label and process status hook enabled could update through the environment variable.
I think 1.4.1 is released, this PR is in the wrong milestone. @arugal Do we need plugin 1.4.1 release? |
When go2sky keeps alive with the backend, it would write a metadata file to the local (temporary directory) at the same time, which describes the information of the current process. | ||
The rover side scans all processes, find out which process contains this metadata file. Finally, the rover could collect, profiling, with this process. |
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.
When go2sky keeps alive with the backend, it would write a metadata file to the local (temporary directory) at the same time, which describes the information of the current process. | |
The rover side scans all processes, find out which process contains this metadata file. Finally, the rover could collect, profiling, with this process. | |
When go2sky keeps alive with the backend, it would write a metadata file to the local (temporary directory) at the same time, which provides the information of the current process. | |
The rover would detect this file in order to identify this Golang service, and tags it `ebpf-profiling-able`. |
As a doc, we don't need to describe how codes work, they are open sourced :) We need to tell why it works in this way.
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.
ebpf-profiling-able
? Do you mean to add this tag to the process labels?
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 mean logically, this is what this is designed for. Nothing about label.
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.
Waiting for @arugal 's approval.
Yes, I left out |
Now we have skywalking-rover, which could detect processes from the local machine. Also, go2sky is one of the official agents in the skywalking ecosystem. We could let these two projects cooperate. If the local machine already has service use go2sky, then the rover could find this process automatically. Finally, the rover side could collect, profiling, etc.
In principle, when go2sky performs keep alive with the backend, it would write a metadata file to the local (temporary directory) at the same time, which describes the information of the current process. The Rover side scans all processes, find out which processes contain this metadata file, and update the confirmed files. Finally, if go2sky sees that it has been confirmed, it would not modify the files again.