-
Notifications
You must be signed in to change notification settings - Fork 67
Description
ECS integration/library project(s) (e.g. Elastic.CommonSchema.Serilog): Elastic.Serilog.Sinks 8.12.2
ECS schema version (e.g. 1.4.0): 8.12.2
ECS .NET assembly version (e.g. 1.4.2):
Elasticsearch version (if applicable): 8.16.0
.NET framework / OS: 8
Description of the problem, including expected versus actual behavior:
Observed an exception while writing to [data stream]
Steps to reproduce:
SelfLog.Enable(Console.Error);
services.AddSerilog((services, lc) => lc
.WriteTo.Elasticsearch(new ElasticsearchSinkOptions(services.GetService()!.Transport)
{
BootstrapMethod = BootstrapMethod.Failure,
IlmPolicy = "logs-dotnet",
DataStream = new DataStreamName("logs", "dotnet", "quartz")
})
.Enrich.FromLogContext()
.MinimumLevel.Information());
Then in console, you will get the following:
2024-11-21T19:54:51.3495000Z Observed an exception while writing to [data stream]
2024-11-21T19:54:51.3496397Z System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<!!0> Elastic.Transport.TransportExtensions.RequestAsync(Elastic.Transport.ITransport, Elastic.Transport.HttpMethod, System.String, Elastic.Transport.PostData, Elastic.Transport.RequestParameters, System.Threading.CancellationToken)'.
at Elastic.Ingest.Elasticsearch.ElasticsearchChannelBase`2.ExportAsync(ITransport transport, ArraySegment`1 page, CancellationToken ctx)
at Elastic.Ingest.Transport.TransportChannelBase`4.ExportAsync(ArraySegment`1 buffer, CancellationToken ctx)
at Elastic.Channels.BufferedChannelBase`3.ExportBufferAsync(ArraySegment`1 items, IOutboundBuffer`1 buffer)