I am in the process of understanding the Elastic product suite, and I don't fully understand 'Metrics'. I know I can send structured log events to Elasticsearch, and I can search and filter on specific fields that I added to the log events using Kibana. I can also build a visualization using those fields and their values.
But we don't retain the logs, and there is no such concept of sampling I could find. So log events are not the same as metrics, although log events can contain metric-like data (e.g. duration of a request: "GET /endpoint completed with status
When not using a regular log event, how do I use Elastic 'Metrics' to instrument my code and send
"RequestDuration": 345, or