Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

How to avoid dropped log events when encountering type mismatches? #280

Open
@hagen93

Description

@hagen93

Hi,

I'm trying to configure the Elasticsearch sink to record all our log events but have stumbled upon a conundrum. Since Elasticsearch rejects new events if the data type of the log event differs from previous events I'm missing some log events here and there. In my specific case ASP.NET and gRPC is both trying to use the property "StatusCode", but ASP.NET uses it as an integer, while gPRC uses it as a string.

How can I ensure that none of the log events gets dropped? I was thinking the best way to avoid this would be to ensure all properties are submitted to Elasticsearch as strings, thus never triggering a conflict in the first place, but I can't seem to figure out a way to achieve this behavior with the sink as it is right now. Is this type of configuration possible?

Secondly, I would expect dropped log events to at least show up as some error in the Serilog self-log, but it seems they are all silently ignored. Is this a bug or is this intended behavior?

Cheers,
A. Hagen

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions