I am using this library https://github.com/serilog/serilog-sinks-elasticsearch to send logs to my Elastic cloud node. I am trying to include the authentication in my code but it's not working.
var logger = new LoggerConfiguration()
.WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri("https://myElasticsearchCloud:9200"))
{
ModifyConnectionSettings = x => x.BasicAuthentication("username", "password"),
IndexFormat = "testing",
}).CreateLogger();
i get no errors, it looks like it worked but when i search it in Kibana i don't see anything.
The Elasticsearch client works fine, but it's not convenient when i want to use the logger. Any suggestions?