-
Notifications
You must be signed in to change notification settings - Fork 524
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
add java attacher config #5483
add java attacher config #5483
Conversation
💔 Build Failed
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪Steps errorsExpand to view the steps failures
|
re-add it at some point when we want to display the version
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! Let's get @felixbarny involved to take a look at the config options.
beater/config/java_attacher.go
Outdated
// attacher jarfile. | ||
type JavaAttacherConfig struct { | ||
Enabled bool `config:"enabled"` | ||
Continuous bool `config:"continuous"` |
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'd rather expect that the apm-server would always set continuous
when starting the attacher; but ultimately leave that to @felixbarny .
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.
👍 will see what he says
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.
+1 on always implicitly using the continuous mode.
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 suppose you're consciously just adding the settings and the impl of these settings comes in a follow up PR?
beater/config/java_attacher.go
Outdated
// attacher jarfile. | ||
type JavaAttacherConfig struct { | ||
Enabled bool `config:"enabled"` | ||
Continuous bool `config:"continuous"` |
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.
+1 on always implicitly using the continuous mode.
For config:
- "service_name=my-cool-service"
- "server_url=http://localhost:8200" Could we do something like this instead? config:
service_name: my-cool-service
server_url: http://localhost:8200 |
beater/config/java_attacher.go
Outdated
IncludeAll bool `config:"include_all"` | ||
IncludePID []string `config:"include_pid"` | ||
|
||
IncludeMain []string `config:"include_main"` |
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.
A note for the implementation: All the values will have to be escaped when passing them to the attacher to avoid injection attack vectors.
Example:
- include_main: "foo; rm -rf /"
should not lead to the hard drive being purged
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.
💯
jenkins run the tests |
* add java attacher config (cherry picked from commit 92f0452)
* add java attacher config (cherry picked from commit 92f0452) Co-authored-by: stuart nelson <[email protected]>
I'm removing this from the 7.14 test plan, as the feature can't be used yet. Let's test the config as part of the feature when we deliver it. |
* add java attacher config (cherry picked from commit 92f0452)
Motivation/summary
Adding basic include/exclude and config flags.
Based on this comment I pulled out version as something to be static for a given build of apm-server, which we update when we bundle with a new version of the attacher.
closes #4829
Checklist
For functional changes, consider:
How to test these changes
Update the
apm-server.yml
to include java attacher config fields, and verify they're parsed.eg.
Related issues