how to capture trace and spans for all the request coming to server. By far I got to know that spans are captured if the span is greater or equal to span_frames_min_duration which is default 5ms. But can we make the agent to capture all spans and traces? and if we can how to do it and where?
span_frames_min_duration is not related to capturing spans, but rather is related to capturing stack traces when starting spans. See the docs here: Stacktrace configuration options | APM Java Agent Reference [1.x] | Elastic
By default the agents will sample all traces. You can control the sampling rate (transaction_sample_rate). Non-sampled traces will suppress spans. Sampled traces will include all spans, up to a maximum number of spans per transaction (transaction_max_spans, defaults to 500).
If i want to do some manual configuration like change the name for the transactions captured then how to do it and where to change the configuration. I saw documentation on public API but am since am so naive
i dont understand how to use those configuration and where to put it.
You will need to modify your application code to use the public API, so to answer this fully we would need to know what language, what frameworks, etc. If for example you were using a Java servlet, you could modify your servlet to use the Java agent's public API, calling ElasticApm.currentTransaction, followed by Transaction.setName.