elastic / apm-agent-ruby

https://www.elastic.co/solutions/apm
Apache License 2.0
167 stars 131 forks source link

Profiling Every Method #864

Open sundarv85 opened 3 years ago

sundarv85 commented 3 years ago

Is your feature request related to a problem? Please describe.

We are seeing certain transactions are slower, but there are no slow database calls in those transactions. So we are not able to identify which methods of ours are slowing down unless we manually instrument all methods in that transaction as spans.

Describe the solution you'd like

If we could get a complete set of methods in a transaction, then we can view the full trace of the transaction

Would such a auto-instrumenting of methods already possible?

On a side note: In Java apm agent we found profiling_inferred_spans_enabled. I'm assuming this is kind of method tracing. Is that correct?

mikker commented 3 years ago

Unfortunately, this is a bit different for Ruby than it is for Java. We're looking at it but it's currently not possible with the agent.

  1. You can add all the custom instrumentation you'd like to. Wrap any methods you think might be culprits.
  2. You could try something like rbspy in production to generate profiles and flamegraphs for every method.
sundarv85 commented 3 years ago

Thanks @mikker You say you are currently looking at it... Will the direction be that each transaction will be profiled separately where all the methods that are called will be captured.

Is there an ETA already for this

Thanks.

mikker commented 3 years ago

Only looking at whether it's even a possibility or not. No ETA at all.

sundarv85 commented 2 years ago

Hi @mikker Is this in your long-term focus.. any plans to achieve this..