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

[Elastic Agent] Read out apm data for diagnostics purpose #112

Open
ruflin opened this issue Nov 24, 2021 · 4 comments
Open

[Elastic Agent] Read out apm data for diagnostics purpose #112

ruflin opened this issue Nov 24, 2021 · 4 comments
Labels
8.2-candidate Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@ruflin
Copy link
Contributor

ruflin commented Nov 24, 2021

As part of the apm instrumenation of Elastic Agent a discussion (elastic/beats#29031 (comment)) was started around how to use the apm data for diagnostic purpose. This issue is to continue this discussion.

@ruflin ruflin added the Team:Elastic-Agent Label for the Agent team label Nov 24, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@axw
Copy link
Member

axw commented Nov 25, 2021

@ruflin:

One thing I'm curious in the context of diagnostics: Assuming someone is not shipping the apm data to ES, would it still be possible to fetch some of it as part of the diagnostics call? Does that even make sense?

@axw:

not out of the box, but it would be possible to do something like this by implementing a custom transport. e.g. we have a transport which decodes events and stores them in memory for testing purposes: https://github.com/elastic/apm-agent-go/blob/master/transport/transporttest/recorder.go

@ruflin:

Is this something that could be enabled "on-demand"? What I have in mind is something like:

User triggers elastic-agent diagnostic command
Recorder is enabled for x seconds
Recording is read out and stored on disk
Recorder is disabled again
Diagnostics finished

Yes, this is possible with a combination of APIs:

i.e. elastic-agent would set up a custom transport that writes events to disk, and would call the tracer's SetRecording method on demand. Alternatively, have the tracer always "recording", but dynamically control the custom transport implementation instead. That might be better, as that way you duplicate events to the custom transport (for on-demand event collection) and to a standard APM Server transport.

@jlind23 jlind23 added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Nov 25, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@lizozom
Copy link

lizozom commented Nov 30, 2021

Hey :-)

I'm coordinating APM data collection for Kibana for internal uses.
I'd love to help and coordinate about this!

@jlind23 jlind23 transferred this issue from elastic/beats Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.2-candidate Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

5 participants