Skip to content
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 --apm-server-record option #567

Merged
merged 14 commits into from Sep 17, 2019

Conversation

@graphaelli
Copy link
Member

commented Jul 29, 2019

for logging payloads sent to apm-server

for use with replaces #565

Sample usage:

# launch env
$ ./scripts/compose.py start master --with-opbeans-go --apm-server-record
# export events
$ docker-compose exec apm-server-2 cp /app/events.json .
# watch events live
$ docker-compose exec apm-server-2 tail -f /app/events.json
{"method":"GET","time":"2019-07-30T17:20:40.046920908Z","url":"/config/v1/agents"}
{"body":"{\"metadata\":{\"system\":{\"architecture\":\"amd64\",\"container\":{\"id\":\"5c26fa8518...

graphaelli and others added 7 commits Jul 25, 2019
add --apm-server-record option
for logging payloads sent to apm-server
@graphaelli

This comment has been minimized.

Copy link
Member Author

commented Jul 30, 2019

@sqren I took some shortcuts to get this working but nothing too offensive to prevent merging. Please give it a spin when time permits and feel free to merge / push changes as you see fit.

@sqren sqren referenced this pull request Aug 7, 2019
@sqren

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

fwiw I had to do the following to copy events.json from the container to the host:

docker cp localtesting_8.0.0_apm-server-2:/app/events.json .

It seems the other command just copies within the container

@sqren

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

This works well when I only start a single opbeans agent but if I run --all it pretty much grinds to a halt and any docker commands take forever (literally: I've not yet see any of them complete yet :D). This is the command I run:

./scripts/compose.py start master --all --apm-server-record
graphaelli added 2 commits Aug 12, 2019
@graphaelli

This comment has been minimized.

Copy link
Member Author

commented Aug 20, 2019

Sorry about the delay and bad instructions @sqren. You're right, that docker-compose cp is busted and your way is right. I've just pushed a fix for the recorder that was causing the issues you experienced.

@sqren

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

@graphaelli When I run --all --apm-server-record it is because I want to capture data from all agents. I do not care about elasticsearch, apm-server, kibana or any beats.
Would it make sense that by default running --apm-server-record would start all agents and teeproxy but nothing else? i'd assume that would make the data collection step a bit faster.

@sqren
sqren approved these changes Sep 4, 2019
Copy link
Member

left a comment

Works great. Thanks for doing this 👍

@graphaelli

This comment has been minimized.

Copy link
Member Author

commented Sep 6, 2019

Would it make sense that by default running --apm-server-record would start all agents and teeproxy but nothing else?

I added a commit to this to allow use of the apm-server file output, so this should do it:

./scripts/compose.py start master --apm-server-record --apm-server-output=file --no-kibana --no-elasticsearch --all
@sqren

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

Awesome, thanks!

graphaelli added 3 commits Sep 9, 2019

@graphaelli graphaelli merged commit 22e62cf into elastic:master Sep 17, 2019

4 checks passed

CLA All commits in pull request signed
Details
Sanity checks Sanity checks passed
Details
Unit Tests Unit Tests passed
Details
apm-ci/pr-merge This commit looks good
Details

@graphaelli graphaelli deleted the graphaelli:tee-record branch Sep 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.