I understand I can use the Elasticsearch client to send anything to Elasticsearch. I am using Serilog, a logging library for .NET which has a plugin to send structured logs to Elasticsearch.
According to your own learning materials on elastic.co, there is a difference between logs and metrics (and traces). They are different 'pillars of observability'. And Elastic has a product called 'Metrics'.
My questions are:
- What makes something a metric?
- How does an index that contains log events differ from an index that contains metrics?
- How do I make sure that when I use an Elasticsearch client (indirectly via my logging library) to send a metric, it is persisted/handled as a metric event, and not as a log event?
PS. I have used Datadog before. Here is their relevant documentation for .NET developers: https://github.com/DataDog/dogstatsd-csharp-client.